Module: Commandoes::IAmACommand::ClassMethods
- Included in:
- Commandoes::IAmACommand
- Defined in:
- lib/commandoes/command.rb
Instance Method Summary collapse
Instance Method Details
#use(plugin, *args, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/commandoes/command.rb', line 6 def use(plugin, *args, &block) unless plugins.include? plugin plugins << plugin extend plugin::ClassMethods if plugin.const_defined? :ClassMethods include plugin::InstanceMethods if plugin.const_defined? :InstanceMethods end self end |