class GLI::Options

Subclass of OpenStruct that provides hash-like methods for [] and []=. Note that is is not a Hash. By using GLI::App#use_openstruct, your options will be coerced into one of these.

Public Instance Methods

[](k) click to toggle source

Return the value of an attribute

# File lib/gli/options.rb, line 9
def[](k)
  @table[k.to_sym]
end
[]=(k, v) click to toggle source

Set the value of an attribute

# File lib/gli/options.rb, line 14
def[]=(k, v)
  @table[k.to_sym] = v
end
map(&block) click to toggle source
# File lib/gli/options.rb, line 18
def map(&block)
  @table.map(&block)
end