Module: CucumberAnalytics::Taggable
Overview
A mix-in module containing methods used by elements that can be tagged.
Instance Attribute Summary collapse
-
#tag_elements ⇒ Object
The tag elements belonging to the element.
-
#tags ⇒ Object
The tags which are directly assigned to the element.
Instance Method Summary collapse
-
#all_tag_elements ⇒ Object
Returns all of the tag elements which are applicable to the element.
-
#all_tags ⇒ Object
Returns all of the tags which are applicable to the element.
-
#applied_tag_elements ⇒ Object
Returns the tags elements which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
-
#applied_tags ⇒ Object
Returns the tags which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
Instance Attribute Details
#tag_elements ⇒ Object
The tag elements belonging to the element
11 12 13 |
# File 'lib/cucumber_analytics/taggable.rb', line 11 def tag_elements @tag_elements end |
#tags ⇒ Object
The tags which are directly assigned to the element
8 9 10 |
# File 'lib/cucumber_analytics/taggable.rb', line 8 def @tags end |
Instance Method Details
#all_tag_elements ⇒ Object
Returns all of the tag elements which are applicable to the element.
32 33 34 |
# File 'lib/cucumber_analytics/taggable.rb', line 32 def all_tag_elements applied_tag_elements + @tag_elements end |
#all_tags ⇒ Object
Returns all of the tags which are applicable to the element.
27 28 29 |
# File 'lib/cucumber_analytics/taggable.rb', line 27 def + @tags end |
#applied_tag_elements ⇒ Object
Returns the tags elements which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
22 23 24 |
# File 'lib/cucumber_analytics/taggable.rb', line 22 def applied_tag_elements @parent_element.respond_to?(:all_tag_elements) ? @parent_element.all_tag_elements : [] end |
#applied_tags ⇒ Object
Returns the tags which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
16 17 18 |
# File 'lib/cucumber_analytics/taggable.rb', line 16 def @parent_element.respond_to?(:all_tags) ? @parent_element. : [] end |