Class: RakeCommandFilter::RakeCommandDefinition
- Inherits:
-
CommandDefinition
- Object
- CommandDefinition
- RakeCommandFilter::RakeCommandDefinition
- Defined in:
- lib/rake_command_definition.rb
Overview
command that runs a rake task
Direct Known Subclasses
RSpecCommandDefinition, RubocopCommandDefinition, YardCommandDefinition
Instance Attribute Summary collapse
-
#test_command ⇒ Object
Returns the value of attribute test_command.
Attributes inherited from CommandDefinition
#default_line_handling, #filter, #name
Instance Method Summary collapse
-
#execute ⇒ Object
Executes a rake task in a subprocess, and captures and parses the output using the filters associated with this command.
-
#initialize(name, test_command) ⇒ RakeCommandDefinition
constructor
A new instance of RakeCommandDefinition.
Methods inherited from CommandDefinition
#add_filter, #add_parameter, find_worst_result
Constructor Details
#initialize(name, test_command) ⇒ RakeCommandDefinition
Returns a new instance of RakeCommandDefinition.
8 9 10 11 |
# File 'lib/rake_command_definition.rb', line 8 def initialize(name, test_command) super(name) @test_command = test_command end |
Instance Attribute Details
#test_command ⇒ Object
Returns the value of attribute test_command.
4 5 6 |
# File 'lib/rake_command_definition.rb', line 4 def test_command @test_command end |
Instance Method Details
#execute ⇒ Object
Executes a rake task in a subprocess, and captures and parses the output using the filters associated with this command
16 17 18 19 |
# File 'lib/rake_command_definition.rb', line 16 def execute command = RakeCommandFilter.testing? ? test_command : "rake #{@name}" return execute_system(command) end |