Class: Pork::Executor
- Inherits:
-
Struct
- Object
- Struct
- Pork::Executor
- Defined in:
- lib/pork/executor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#isolator ⇒ Object
Returns the value of attribute isolator.
Class Method Summary collapse
- .[](index) ⇒ Object
- .execute(mode: Pork.execute_mode, stat: Pork.stat, suite: Suite, isolator: Isolator[suite], paths: isolator.all_paths) ⇒ Object
Instance Method Summary collapse
- #execute(stat = Stat.new, paths = isolator.all_paths) ⇒ Object
-
#initialize(new_isolator) ⇒ Executor
constructor
A new instance of Executor.
Constructor Details
#initialize(new_isolator) ⇒ Executor
Returns a new instance of Executor.
20 21 22 23 24 |
# File 'lib/pork/executor.rb', line 20 def initialize new_isolator super(new_isolator) extensions = Pork.execute_extensions extend(*extensions.reverse) if extensions.any? end |
Instance Attribute Details
#isolator ⇒ Object
Returns the value of attribute isolator
6 7 8 |
# File 'lib/pork/executor.rb', line 6 def isolator @isolator end |
Class Method Details
.[](index) ⇒ Object
7 8 9 |
# File 'lib/pork/executor.rb', line 7 def self.[] index Isolator[][index] end |
.execute(mode: Pork.execute_mode, stat: Pork.stat, suite: Suite, isolator: Isolator[suite], paths: isolator.all_paths) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pork/executor.rb', line 11 def self.execute mode: Pork.execute_mode, stat: Pork.stat, suite: Suite, isolator: Isolator[suite], paths: isolator.all_paths require "pork/mode/#{mode}" Pork.const_get(mode.capitalize).new(isolator).execute(stat, paths) end |
Instance Method Details
#execute(stat = Stat.new, paths = isolator.all_paths) ⇒ Object
26 27 28 |
# File 'lib/pork/executor.rb', line 26 def execute stat=Stat.new, paths=isolator.all_paths raise NotImplementedError end |