Module: Commandos::IAmACommand::ClassMethods
- Included in:
- Commandos::IAmACommand
- Defined in:
- lib/commandos/command.rb
Instance Method Summary collapse
Instance Method Details
#use(plugin, *args, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/commandos/command.rb', line 4 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 |