Class: Crystalball::ExecutionMap
- Inherits:
-
Object
- Object
- Crystalball::ExecutionMap
- Extended by:
- Forwardable
- Defined in:
- lib/crystalball/execution_map.rb
Overview
Storage for execution map
Defined Under Namespace
Classes: Metadata
Instance Attribute Summary collapse
-
#example_groups ⇒ Object
readonly
Returns the value of attribute example_groups.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#<<(example_group_map) ⇒ Object
Adds example group map to the list.
-
#clear! ⇒ Object
Remove all example_groups.
-
#initialize(metadata: {}, example_groups: {}) ⇒ ExecutionMap
constructor
A new instance of ExecutionMap.
Constructor Details
#initialize(metadata: {}, example_groups: {}) ⇒ ExecutionMap
Returns a new instance of ExecutionMap.
34 35 36 37 38 |
# File 'lib/crystalball/execution_map.rb', line 34 def initialize(metadata: {}, example_groups: {}) @example_groups = example_groups @metadata = Metadata.new(type: self.class.name, **) end |
Instance Attribute Details
#example_groups ⇒ Object
Returns the value of attribute example_groups.
27 28 29 |
# File 'lib/crystalball/execution_map.rb', line 27 def example_groups @example_groups end |
#metadata ⇒ Object
Returns the value of attribute metadata.
27 28 29 |
# File 'lib/crystalball/execution_map.rb', line 27 def @metadata end |
Instance Method Details
#<<(example_group_map) ⇒ Object
Adds example group map to the list
43 44 45 |
# File 'lib/crystalball/execution_map.rb', line 43 def <<(example_group_map) example_groups[example_group_map.uid] = example_group_map.used_files.uniq end |
#clear! ⇒ Object
Remove all example_groups
48 49 50 |
# File 'lib/crystalball/execution_map.rb', line 48 def clear! self.example_groups = {} end |