Module: CLIApp

Defined in:
lib/cliapp.rb

Defined Under Namespace

Modules: Util Classes: Action, ActionError, ActionNotFoundError, ActionTooFewArgsError, ActionTooManyArgsError, Application, Config

Class Method Summary collapse

Class Method Details

.new(name, desc, version: nil, command: nil, **kws, &gopts_handler) ⇒ Object



78
79
80
81
82
83
# File 'lib/cliapp.rb', line 78

def self.new(name, desc, version: nil, command: nil, **kws, &gopts_handler)
  #; [!gpvqe] creates new Config object internally.
  config = Config.new(name: name, desc: desc, version: version, command: command, **kws)
  #; [!qyunk] creates new Application object with config object created.
  return Application.new(config, &gopts_handler)
end

.skeletonObject



408
409
410
411
# File 'lib/cliapp.rb', line 408

def self.skeleton()
  #; [!zls9g] returns example code.
  return File.read(__FILE__).split(/^__END__\n/, 2)[1]
end