Module: CukeModeler::Taggable
Overview
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
8 9 10 |
# File 'lib/cuke_modeler/taggable.rb', line 8 def @tags end |
Instance Method Details
#all_tags ⇒ Object
Returns models for all of the tags which are applicable to the element.
18 19 20 |
# File 'lib/cuke_modeler/taggable.rb', line 18 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).
13 14 15 |
# File 'lib/cuke_modeler/taggable.rb', line 13 def parent_model.respond_to?(:all_tags) ? parent_model. : [] end |