Module: NanDoc::CliCommandHelpers
Instance Method Summary
collapse
#exclusive_opt_flags, #normalize_opts, #unnormalize_opt_key, #unnormalize_opt_keys
Methods included from TaskCommon
#task_abort
Methods included from PathHelper
#assert_path
Instance Method Details
#command_name ⇒ Object
3
4
5
6
|
# File 'lib/nandoc/support-modules.rb', line 3
def command_name
(/::([_a-z0-9]+)\Z/i =~ self.class.to_s and base = $1) or fail('no')
base.gsub(/([a-z])([A-Z])/){ "#{$1}-#{$2}" }.downcase
end
|
#invite_to_more_command_help ⇒ Object
7
8
9
|
# File 'lib/nandoc/support-modules.rb', line 7
def invite_to_more_command_help
"see `nandoc help #{command_name}` for more information."
end
|
#invocation_name ⇒ Object
10
11
12
|
# File 'lib/nandoc/support-modules.rb', line 10
def invocation_name
File.basename($PROGRAM_NAME)
end
|