Method: Tag#untag
- Defined in:
- lib/glue/taggable.rb
#untag(obj = nil) ⇒ Object Also known as: unlink
Untags an object. If no object is passed, it just decrements the (reference) count. If the count reaches 0 the tag is deleted (garbage collection).
55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/glue/taggable.rb', line 55 def untag(obj = nil) if obj # TODO: implement me. end @count -= 1 if @count > 0 update_property :count else self.delete() end end |