Class: Lucy::Goosey::OptionsHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/lucy-goosey.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argvObject

Returns the value of attribute argv.



10
11
12
# File 'lib/lucy-goosey.rb', line 10

def argv
  @argv
end

Instance Method Details

#help?Boolean

Returns true if -h or –help are any of the arg or ‘help’ is the first word to argv

Returns:

  • (Boolean)


14
15
16
# File 'lib/lucy-goosey.rb', line 14

def help?
  self['h'] || self['help'] || argv[0] == 'help'
end