Module: Shellissimo::DSL::ClassMethods
- Defined in:
- lib/shellissimo/dsl.rb
Instance Method Summary collapse
- #add_command(command) ⇒ Object
-
#commands ⇒ CommandsCollection
A list of defined commands.
Instance Method Details
#add_command(command) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/shellissimo/dsl.rb', line 36 def add_command(command) new_commands = (commands << command) define_singleton_method :commands do new_commands end end |
#commands ⇒ CommandsCollection
Returns a list of defined commands.
32 33 34 |
# File 'lib/shellissimo/dsl.rb', line 32 def commands CommandsCollection.new end |