Class: Nasty::CompositeCommand
- Includes:
- Command
- Defined in:
- lib/nasty/composite_command.rb
Instance Method Summary collapse
-
#initialize(first, last) ⇒ CompositeCommand
constructor
A new instance of CompositeCommand.
- #run(*args) ⇒ Object
Methods included from Command
Constructor Details
#initialize(first, last) ⇒ CompositeCommand
Returns a new instance of CompositeCommand.
5 6 7 8 |
# File 'lib/nasty/composite_command.rb', line 5 def initialize(first, last) @first = first @last = last end |
Instance Method Details
#run(*args) ⇒ Object
10 11 12 13 |
# File 'lib/nasty/composite_command.rb', line 10 def run(*args) @first.run(*args) @last.run(*args) end |