Module: CucumberAnalytics::Taggable

Included in:
Example, Feature, Outline, Scenario
Defined in:
lib/cucumber_analytics/taggable.rb

Overview

A mix-in module containing methods used by elements that can be tagged.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tag_elementsObject

The tag elements belonging to the element



11
12
13
# File 'lib/cucumber_analytics/taggable.rb', line 11

def tag_elements
  @tag_elements
end

#tagsObject

The tags which are directly assigned to the element



8
9
10
# File 'lib/cucumber_analytics/taggable.rb', line 8

def tags
  @tags
end

Instance Method Details

#all_tag_elementsObject

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_tagsObject

Returns all of the tags which are applicable to the element.



27
28
29
# File 'lib/cucumber_analytics/taggable.rb', line 27

def all_tags
  applied_tags + @tags
end

#applied_tag_elementsObject

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_tagsObject

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 applied_tags
  @parent_element.respond_to?(:all_tags) ? @parent_element.all_tags : []
end