Class: Inferno::Utils::PresetProcessor Private
- Inherits:
-
Object
- Object
- Inferno::Utils::PresetProcessor
- Defined in:
- lib/inferno/utils/preset_processor.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class determines which values to use in a preset based on the suite options chosen in a session.
Instance Attribute Summary collapse
-
#preset ⇒ Object
private
-
#session ⇒ Object
private
-
#suite ⇒ Object
private
-
#suite_inputs ⇒ Object
private
-
#suite_options ⇒ Object
private
Instance Method Summary collapse
-
#initialize(preset, session) ⇒ PresetProcessor
constructor
private
A new instance of PresetProcessor.
-
#processed_inputs ⇒ Object
private
Returns the list of inputs which need to be persisted, with options applied.
Constructor Details
#initialize(preset, session) ⇒ PresetProcessor
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PresetProcessor.
9 10 11 12 13 14 15 |
# File 'lib/inferno/utils/preset_processor.rb', line 9 def initialize(preset, session) self.preset = preset self.session = session self.suite = session.test_suite self.suite_inputs = suite.available_inputs.transform_values(&:to_hash) self. = session. end |
Instance Attribute Details
#preset ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/inferno/utils/preset_processor.rb', line 7 def preset @preset end |
#session ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/inferno/utils/preset_processor.rb', line 7 def session @session end |
#suite ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/inferno/utils/preset_processor.rb', line 7 def suite @suite end |
#suite_inputs ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/inferno/utils/preset_processor.rb', line 7 def suite_inputs @suite_inputs end |
#suite_options ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'lib/inferno/utils/preset_processor.rb', line 7 def @suite_options end |
Instance Method Details
#processed_inputs ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the list of inputs which need to be persisted, with options applied.
19 20 21 22 23 |
# File 'lib/inferno/utils/preset_processor.rb', line 19 def processed_inputs preset.inputs .map { |input| (input) } .compact end |