Module: CukeModeler::Taggable

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

Overview

NOT A PART OF THE PUBLIC API A mix-in module containing methods used by models that represent an element that can be tagged.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#tagsObject

The models for tags which are directly assigned to the element



9
10
11
# File 'lib/cuke_modeler/taggable.rb', line 9

def tags
  @tags
end

Instance Method Details

#all_tagsObject

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



19
20
21
# File 'lib/cuke_modeler/taggable.rb', line 19

def all_tags
  applied_tags + @tags
end

#applied_tagsObject

Returns the models for tags which are indirectly assigned to the element (i.e. they have been inherited from a parent element).



14
15
16
# File 'lib/cuke_modeler/taggable.rb', line 14

def applied_tags
  parent_model.respond_to?(:all_tags) ? parent_model.all_tags : []
end