Module: CukeModeler::Taggable Private
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
A mix-in module containing methods used by models that represent an element that can be tagged. Internal helper class.
Instance Attribute Summary collapse
-
#tags ⇒ Object
The models for tags which are directly assigned to the element.
Instance Method Summary collapse
-
#all_tags ⇒ Array<Tag>
Returns models for all of the tags which are applicable to the element.
-
#applied_tags ⇒ Array<Tag>
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
12 13 14 |
# File 'lib/cuke_modeler/taggable.rb', line 12 def @tags end |
Instance Method Details
#all_tags ⇒ Array<Tag>
Returns models for all of the tags which are applicable to the element.
36 37 38 |
# File 'lib/cuke_modeler/taggable.rb', line 36 def + @tags end |
#applied_tags ⇒ Array<Tag>
Returns the models for tags which are indirectly assigned to the element (i.e. they have been inherited from a parent element).
24 25 26 |
# File 'lib/cuke_modeler/taggable.rb', line 24 def parent_model.respond_to?(:all_tags) ? parent_model. : [] end |