Module: Reflex::HasTags

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

Instance Method Summary collapse

Instance Method Details

#clear_tagsObject



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

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

#tag(*tags) ⇒ Object



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

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

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



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

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

#tagsObject



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

def tags()
  to_enum :each_tag
end

#untag(*tags) ⇒ Object



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

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