Method: GLI::AppSupport#reset

Defined in:
lib/gli/app_support.rb

#resetObject

Reset the GLI module internal data structures; mostly useful for testing



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/gli/app_support.rb', line 14

def reset # :nodoc:
  switches.clear
  flags.clear
  @commands = nil
  @commands_declaration_order = []
  @flags_declaration_order = []
  @switches_declaration_order = []
  @version = nil
  @config_file = nil
  @use_openstruct = false
  @prog_desc = nil
  @error_block = false
  @pre_block = false
  @post_block = false
  @default_command = :help
  @around_block = nil
  @subcommand_option_handling_strategy = :legacy
  clear_nexts
end