Class: Delicious::Tag
- Inherits:
-
Object
- Object
- Delicious::Tag
- Includes:
- ActiveModel::Model, ApiModel
- Defined in:
- lib/delicious/tag.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes this tag.
- #to_s ⇒ Object
Methods included from ApiModel
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
8 9 10 |
# File 'lib/delicious/tag.rb', line 8 def count @count end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/delicious/tag.rb', line 8 def name @name end |
Instance Method Details
#delete ⇒ Boolean
Deletes this tag
14 15 16 17 18 19 20 |
# File 'lib/delicious/tag.rb', line 14 def delete if persisted? && @delicious_client @delicious_client..delete(name) else fail Delicious::Error, 'Tag was not saved yet' end end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/delicious/tag.rb', line 22 def to_s %Q(Tag(name: "#{name}", count: #{count})) end |