Module: Reflex::HasTags

Included in:
Constraint, Selector, Shape, Style, View
Defined in:
lib/reflex/helper.rb

Instance Method Summary collapse

Instance Method Details

#clear_tagsObject



108
109
110
# File 'lib/reflex/helper.rb', line 108

def clear_tags()
  untag(*tags.to_a)
end

#tag(*tags) ⇒ Object



96
97
98
# File 'lib/reflex/helper.rb', line 96

def tag(*tags)
  tags.each {|tag| add_tag tag}
end

#tag=(*tags) ⇒ Object Also known as: tags=



89
90
91
92
# File 'lib/reflex/helper.rb', line 89

def tag=(*tags)
  clear_tags
  tag(*tags.flatten)
end

#tagsObject



104
105
106
# File 'lib/reflex/helper.rb', line 104

def tags()
  to_enum :each_tag
end

#untag(*tags) ⇒ Object



100
101
102
# File 'lib/reflex/helper.rb', line 100

def untag(*tags)
  tags.each {|tag| remove_tag tag}
end