Class: YARD::CodeObjects::Cucumber::Tag
- Inherits:
-
NamespaceObject
- Object
- NamespaceObject
- NamespaceObject
- YARD::CodeObjects::Cucumber::Tag
- Defined in:
- lib/yard/code_objects/cucumber/tag.rb
Instance Attribute Summary collapse
-
#owners ⇒ Object
Returns the value of attribute owners.
-
#total_scenarios ⇒ Object
Returns the value of attribute total_scenarios.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Methods included from LocationHelper
#file, #line_number, #location
Instance Attribute Details
#owners ⇒ Object
Returns the value of attribute owners.
4 5 6 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 4 def owners @owners end |
#total_scenarios ⇒ Object
Returns the value of attribute total_scenarios.
4 5 6 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 4 def total_scenarios @total_scenarios end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 4 def value @value end |
Instance Method Details
#all_scenarios ⇒ Object
27 28 29 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 27 def all_scenarios scenarios + indirect_scenarios end |
#features ⇒ Object
6 7 8 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 6 def features @owners.find_all { |owner| owner.is_a?(Feature) } end |
#indirect_scenarios ⇒ Object
23 24 25 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 23 def indirect_scenarios @owners.find_all { |owner| owner.is_a?(Feature) }.collect { |feature| feature.scenarios }.flatten end |
#scenarios ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/yard/code_objects/cucumber/tag.rb', line 10 def scenarios all = @owners.find_all do |owner| owner.is_a?(Scenario) || owner.is_a?(ScenarioOutline) || () end @owners.each do |owner| if owner.is_a?(ScenarioOutline::Examples) && !all.include?(owner.scenario) all << owner.scenario end end all end |