Module: TagBuilder::ContainerTagMixin
- Includes:
- Enumerable
- Included in:
- ContainerTagBwCd, ContainerTagInCd
- Defined in:
- lib/tag_builder/container_tag_mixin.rb
Overview
Mixin for ContainerTag related classes
Instance Attribute Summary collapse
-
#review ⇒ Object
readonly
Returns the value of attribute review.
Instance Method Summary collapse
Instance Attribute Details
#review ⇒ Object (readonly)
Returns the value of attribute review.
34 35 36 |
# File 'lib/tag_builder/container_tag_mixin.rb', line 34 def review @review end |
Instance Method Details
#ordered_tags(tags) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/tag_builder/container_tag_mixin.rb', line 35 def () .sort {|a, b| tag_1 = a[1][0] tag_2 = b[1][0] if @class_tags.include? tag_1[:tag_id] and !@class_tags.include? tag_2[:tag_id] +1 elsif !@class_tags.include? tag_1[:tag_id] and @class_tags.include? tag_2[:tag_id] -1 else tag_1[:text] <=> tag_2[:text] end } end |