Class: SpecRunQueue::Queue::Base
- Inherits:
-
Object
- Object
- SpecRunQueue::Queue::Base
- Defined in:
- lib/spec_run_queue/queue/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(runner) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(runner) ⇒ Base
Returns a new instance of Base.
6 7 8 9 10 |
# File 'lib/spec_run_queue/queue/base.rb', line 6 def initialize(runner) @runner = runner connect reset_queue end |
Instance Attribute Details
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
4 5 6 |
# File 'lib/spec_run_queue/queue/base.rb', line 4 def runner @runner end |
Class Method Details
.run_rescue_exceptions ⇒ Object
22 23 24 |
# File 'lib/spec_run_queue/queue/base.rb', line 22 def self.run_rescue_exceptions [] end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/spec_run_queue/queue/base.rb', line 12 def run with_reconnect do while (raw_instruction = queue_fetch) raise "Dangerous yaml!" if raw_instruction[1] =~ /!ruby/ instruction = YAML.load(raw_instruction[1]) runner.run_spec(instruction) end end end |