Class: MCLI::NullCommand
Instance Attribute Summary
Attributes inherited from Command
#args
Instance Method Summary
collapse
Methods inherited from Command
call, capture_all!, capture_all?, command_name, #create_parser, default_command_group, description, #initialize, option, options, #options, #parse, #parser, register_as, register_as_root
Constructor Details
This class inherits a constructor from MCLI::Command
Instance Method Details
#help ⇒ Object
12
13
14
|
# File 'lib/mcli/null_command.rb', line 12
def help
puts help_message
end
|
#help_message ⇒ Object
16
17
18
|
# File 'lib/mcli/null_command.rb', line 16
def help_message
"No command passed\n#{parser.to_s}"
end
|
#run ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/mcli/null_command.rb', line 4
def run
if options[:version]
puts MCLI::VERSION
else
help
end
end
|