Class: Cindy::Command
- Inherits:
-
Object
- Object
- Cindy::Command
- Defined in:
- lib/cindy/command.rb
Instance Method Summary collapse
- #call(executor) ⇒ Object
-
#initialize(command, options = {}) ⇒ Command
constructor
A new instance of Command.
- #inspect ⇒ Object
- #to_s ⇒ Object
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, = {}) @command = command @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 |
#inspect ⇒ Object
12 13 14 |
# File 'lib/cindy/command.rb', line 12 def inspect "#{self.class.name}.new(#{@command.inspect}, TODO)" end |
#to_s ⇒ Object
8 9 10 |
# File 'lib/cindy/command.rb', line 8 def to_s @command end |