Class: CucumberFM::Aggregator
- Inherits:
-
Object
- Object
- CucumberFM::Aggregator
- Defined in:
- lib/cucumber_f_m/aggregator.rb
Defined Under Namespace
Classes: Collection, ScenarioCollection
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(cfm, aggregator, multiple = false) ⇒ Aggregator
constructor
A new instance of Aggregator.
Constructor Details
#initialize(cfm, aggregator, multiple = false) ⇒ Aggregator
Returns a new instance of Aggregator.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cucumber_f_m/aggregator.rb', line 3 def initialize(cfm, aggregator, multiple = false) if multiple @collection = Collection.nested_hash(0) multiple.each do |tag| cfm.scenarios.each do |scenario| @collection[tag].push scenario if scenario..include?(tag) end end else @collection = Collection.nested_hash(aggregator.size) if aggregator.size == 2 cfm.scenarios.each do |scenario| @collection[label(aggregator.first, scenario.)][label(aggregator.last, scenario.)][scenario.feature].push scenario end else @collection = Collection.nested_hash(1) cfm.scenarios.each do |scenario| @collection[label(aggregator.first, scenario.)][scenario.feature].push scenario end end end end |
Instance Method Details
#collection ⇒ Object
26 27 28 |
# File 'lib/cucumber_f_m/aggregator.rb', line 26 def collection @collection end |