Class: Turnip::Node::ScenarioGroupDefinition

Inherits:
Base
  • Object
show all
Defined in:
lib/turnip/node/scenario_group_definition.rb

Direct Known Subclasses

Feature, Rule

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from HasLocation

#line, #location

Constructor Details

This class inherits a constructor from Turnip::Node::Base

Instance Method Details

#backgroundsObject



21
22
23
24
25
# File 'lib/turnip/node/scenario_group_definition.rb', line 21

def backgrounds
  @backgrounds ||= children.select do |c|
    c.is_a?(Background)
  end
end

#descriptionObject



17
18
19
# File 'lib/turnip/node/scenario_group_definition.rb', line 17

def description
  @raw.description
end

#keywordObject



13
14
15
# File 'lib/turnip/node/scenario_group_definition.rb', line 13

def keyword
  @raw.keyword
end

#nameObject



9
10
11
# File 'lib/turnip/node/scenario_group_definition.rb', line 9

def name
  @raw.name
end

#scenariosObject



27
28
29
30
31
32
33
34
35
36
# File 'lib/turnip/node/scenario_group_definition.rb', line 27

def scenarios
  @scenarios ||= children.map do |c|
    case c
    when Scenario
      c
    when ScenarioOutline
      c.to_scenarios
    end
  end.flatten.compact
end