Module: Reflex::HasTags

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

Instance Method Summary collapse

Instance Method Details

#clear_tagsObject



80
81
82
# File 'lib/reflex/helper.rb', line 80

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

#tag(*tags) ⇒ Object



68
69
70
# File 'lib/reflex/helper.rb', line 68

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

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



61
62
63
64
# File 'lib/reflex/helper.rb', line 61

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

#tagsObject



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

def tags()
  to_enum :each_tag
end

#untag(*tags) ⇒ Object



72
73
74
# File 'lib/reflex/helper.rb', line 72

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