Class: JsTestDriver::Runner::Command
- Inherits:
-
Object
- Object
- JsTestDriver::Runner::Command
- Defined in:
- lib/js_test_driver/runner.rb
Instance Method Summary collapse
-
#initialize(executable) ⇒ Command
constructor
A new instance of Command.
- #option(name, value = nil) ⇒ Object
- #run ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(executable) ⇒ Command
Returns a new instance of Command.
206 207 208 |
# File 'lib/js_test_driver/runner.rb', line 206 def initialize(executable) @command = "#{executable}" end |
Instance Method Details
#option(name, value = nil) ⇒ Object
210 211 212 213 214 |
# File 'lib/js_test_driver/runner.rb', line 210 def option(name, value = nil) value = "'#{value}'" if value && value =~ /\s/ @command = [@command, name, value].compact.join(' ') self end |
#run ⇒ Object
216 217 218 |
# File 'lib/js_test_driver/runner.rb', line 216 def run system(self.to_s) end |
#to_s ⇒ Object
220 221 222 |
# File 'lib/js_test_driver/runner.rb', line 220 def to_s return @command end |