Module: Reflex::HasTags

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

Instance Method Summary collapse

Instance Method Details

#clear_tagsObject



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

def clear_tags ()
  untag *tags.to_a
end

#tag(*tags) ⇒ Object



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

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

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



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

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

#tagsObject



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

def tags ()
  to_enum :each_tag
end

#untag(*tags) ⇒ Object



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

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