Class: Mpx::Command
- Inherits:
-
Object
- Object
- Mpx::Command
- Defined in:
- lib/mpx/command.rb
Overview
Represents a command to be run.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(bin, working_directory) ⇒ Command
constructor
A new instance of Command.
- #name ⇒ Object
- #run(args) ⇒ Object
Constructor Details
#initialize(bin, working_directory) ⇒ Command
Returns a new instance of Command.
10 11 12 13 |
# File 'lib/mpx/command.rb', line 10 def initialize(bin, working_directory) @bin = bin @working_directory = working_directory end |
Instance Method Details
#<=>(other) ⇒ Object
15 16 17 |
# File 'lib/mpx/command.rb', line 15 def <=>(other) return self.name <=> other.name end |
#name ⇒ Object
19 20 21 |
# File 'lib/mpx/command.rb', line 19 def name return File.basename(@bin) end |