Module: Cuporter::Node::Tagged
- Included in:
- Cuporter::Node::Types::Examples, Cuporter::Node::Types::Feature, Cuporter::Node::Types::Scenario, Cuporter::Node::Types::ScenarioOutline
- Defined in:
- lib/cuporter/node/tagged_node.rb
Overview
a node with a list of tags that can be applied to all children
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
Instance Method Summary collapse
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
7 8 9 |
# File 'lib/cuporter/node/tagged_node.rb', line 7 def filter @filter end |
Instance Method Details
#filter_child(node, context_tags = []) ⇒ Object
15 16 17 |
# File 'lib/cuporter/node/tagged_node.rb', line 15 def filter_child(node, = []) add_child(node) if @filter.pass?( | | node.) end |
#has_tags? ⇒ Boolean
9 10 11 |
# File 'lib/cuporter/node/tagged_node.rb', line 9 def .size > 0 end |
#tags ⇒ Object
12 13 14 |
# File 'lib/cuporter/node/tagged_node.rb', line 12 def @tags ||= attributes["tags"].to_s.split(/,\s*/) || [] end |