Method: CommandLine::Application#initialize

Defined in:
lib/commandline/application.rb

#initializeApplication

Returns a new instance of Application.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/commandline/application.rb', line 41

def initialize
  @synopsis    = ""
  @arg_arity   = [0,0]
  @options     = []
  @arg_names   = []
  @args        = []
  @replay      = false
  @replay_file = ".replay"

  __initialize_text_formatting

  # Call the child usurped initialize
  __child_initialize if 
    self.class.private_instance_methods(false).include?("__child_initialize")

  @option_parser ||= CommandLine::OptionParser.new(@options)
end