Module: CukeModeler::Taggable
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
-
#tags ⇒ Object
The models for tags which are directly assigned to the element.
Instance Method Summary collapse
-
#all_tags ⇒ Object
Returns models for all of the tags which are applicable to the element.
-
#applied_tags ⇒ Object
Returns the models for tags which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
Instance Attribute Details
#tags ⇒ Object
The models for tags which are directly assigned to the element
9 10 11 |
# File 'lib/cuke_modeler/taggable.rb', line 9 def @tags end |
Instance Method Details
#all_tags ⇒ Object
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 + @tags end |
#applied_tags ⇒ Object
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 parent_model.respond_to?(:all_tags) ? parent_model. : [] end |