Module: CommandKit::Description
- Extended by:
- ModuleMethods
- Includes:
- Help
- Included in:
- Command
- Defined in:
- lib/command_kit/description.rb
Overview
Allows adding a description to a command's class.
Examples
include CommandKit::Description
description "Does things and stuff"
Defined Under Namespace
Modules: ClassMethods, ModuleMethods
Instance Method Summary collapse
- #description ⇒ Object
-
#help ⇒ Object
Calls the superclass'es
#help
method, if it's defined, then calls #help_description. -
#help_description ⇒ Object
Prints the description, if set.
Methods included from ModuleMethods
Methods included from Help::ModuleMethods
Instance Method Details
#description ⇒ Object
76 77 78 |
# File 'lib/command_kit/description.rb', line 76 def description self.class.description end |
#help ⇒ Object
Calls the superclass'es #help
method, if it's defined, then calls
#help_description.
98 99 100 101 102 |
# File 'lib/command_kit/description.rb', line 98 def help super help_description end |
#help_description ⇒ Object
Prints the description, if set.
85 86 87 88 89 90 |
# File 'lib/command_kit/description.rb', line 85 def help_description if (description = self.description) puts puts description end end |