In Files

Files

Class/Module Index [+]

Quicksearch

ARGV

Public Class Methods

req_arg() click to toggle source
# File install.rb, line 104
def ARGV.req_arg
#{{{
  self.shift || raise('missing argument')
#}}}
end
switch() click to toggle source
# File install.rb, line 88
def ARGV.switch
#{{{
  return nil if self.empty?
  arg = self.shift
  return nil if arg == '--'
  if arg =~ /^-(.)(.*)/
    return arg if $1 == '-'
    raise 'unknown switch "-"' if $2.index('-')
    self.unshift "-#{$2}" if $2.size > 0
    "-#{$1}"
  else
    self.unshift arg
    nil
  end
#}}}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.