Method: CommandKit::Main::ClassMethods#main

Defined in:
lib/command_kit/main.rb

#main(argv = [], **kwargs) ⇒ Integer

Initializes the command class with the given keyword arguments, then calls main with the given argv.

Parameters:

  • argv (Array<String>) (defaults to: [])

    The Array of command-line arguments.

  • kwargs (Hash{Symbol => Object})

    Additional keyword arguments to initialize the command class with.

Returns:

  • (Integer)

    The exit status of the command.



78
79
80
# File 'lib/command_kit/main.rb', line 78

def main(argv=[], **kwargs)
  new(**kwargs).main(argv)
end