Class: Nasty::CompositeCommand

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/nasty/composite_command.rb

Instance Method Summary collapse

Methods included from Command

#then

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