Class: OptParsePlus::OptionsFound

Inherits:
Hash
  • Object
show all
Defined in:
lib/opt_parse_plus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#command_foundObject

Returns the value of attribute command_found.



8
9
10
# File 'lib/opt_parse_plus.rb', line 8

def command_found
  @command_found
end

Instance Method Details

#[](key) ⇒ Object

Let these options be queried by a string key or symbol key equally.



12
13
14
15
16
# File 'lib/opt_parse_plus.rb', line 12

def [](key)
  super ||
    (key.is_a?(Symbol) && super(key.to_s)) ||
    (key.is_a?(String) && super(key.to_sym))
end