Sha256: 5869e369d3510ee81adf250a3e6761439a43386f914ea092fb265c8cab4a5e1c
Contents?: true
Size: 493 Bytes
Versions: 51
Compression:
Stored size: 493 Bytes
Contents
require 'ostruct' module GLI # 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. class Options < OpenStruct # Return the value of an attribute def[](k) @table[k.to_sym] end # Set the value of an attribute def[]=(k, v) @table[k.to_sym] = v end def map(&block) @table.map(&block) end end end
Version data entries
51 entries across 51 versions & 2 rubygems