Module: Reflex::HasTags

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

Instance Method Summary collapse

Instance Method Details

#clear_tagsObject



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

def clear_tags ()
  untag *tags.to_a
end

#tag(*tags) ⇒ Object



83
84
85
# File 'lib/reflex/helper.rb', line 83

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

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



76
77
78
79
# File 'lib/reflex/helper.rb', line 76

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

#tagsObject



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

def tags ()
  to_enum :each_tag
end

#untag(*tags) ⇒ Object



87
88
89
# File 'lib/reflex/helper.rb', line 87

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