Method: GLI::App#use_openstruct

Defined in:
lib/gli/app.rb

#use_openstruct(use_openstruct) ⇒ Object

Call this with true will cause the global_options and options passed to your code to be wrapped in Options, which is a subclass of OpenStruct that adds [] and []= methods.

use_openstruct

a Boolean indicating if we should use OpenStruct instead of Hashes



178
179
180
# File 'lib/gli/app.rb', line 178

def use_openstruct(use_openstruct)
  @use_openstruct = use_openstruct
end