Class: Cindy::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/cindy/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(command, options = {}) ⇒ Command

Returns a new instance of Command.



3
4
5
6
# File 'lib/cindy/command.rb', line 3

def initialize(command, options = {})
    @command = command
    @options = options
end

Instance Method Details

#call(executor) ⇒ Object



16
17
18
# File 'lib/cindy/command.rb', line 16

def call(executor)
    executor.exec(@command, @options)
end

#inspectObject



12
13
14
# File 'lib/cindy/command.rb', line 12

def inspect
    "#{self.class.name}.new(#{@command.inspect}, TODO)"
end

#to_sObject



8
9
10
# File 'lib/cindy/command.rb', line 8

def to_s
    @command
end