Module: CommandKit::Options::Parser::ModuleMethods Private
- Included in:
- CommandKit::Options::Parser
- Defined in:
- lib/command_kit/options/parser.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#included(context) ⇒ Object
private
Sets .usage or extends ModuleMethods, depending on whether CommandKit::Options::Parser is being included into a class or a module.
Instance Method Details
#included(context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Sets .usage or extends CommandKit::Options::Parser::ModuleMethods, depending on whether CommandKit::Options::Parser is being included into a class or a module.
48 49 50 51 52 53 54 55 56 |
# File 'lib/command_kit/options/parser.rb', line 48 def included(context) super if context.class == Module context.extend ModuleMethods elsif context.usage.nil? context.usage '[options]' end end |