Class: Delicious::Post
- Inherits:
-
Object
- Object
- Delicious::Post
- Includes:
- ActiveModel::Model, ActiveModel::Validations, ApiModel
- Defined in:
- lib/delicious/post.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#dt ⇒ Object
Returns the value of attribute dt.
-
#extended ⇒ Object
Returns the value of attribute extended.
-
#shared ⇒ Object
Returns the value of attribute shared.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#delete ⇒ Boolean
Deletes this bookmark.
- #to_s ⇒ Object
Methods included from ApiModel
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def description @description end |
#dt ⇒ Object
Returns the value of attribute dt.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def dt @dt end |
#extended ⇒ Object
Returns the value of attribute extended.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def extended @extended end |
#shared ⇒ Object
Returns the value of attribute shared.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def shared @shared end |
#tags ⇒ Object
Returns the value of attribute tags.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def @tags end |
#url ⇒ Object
Returns the value of attribute url.
9 10 11 |
# File 'lib/delicious/post.rb', line 9 def url @url end |
Instance Method Details
#delete ⇒ Boolean
Deletes this bookmark
30 31 32 33 34 35 36 |
# File 'lib/delicious/post.rb', line 30 def delete if persisted? && @delicious_client @delicious_client.bookmarks.delete url: url else fail 'Bookmark was not saved yet' end end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/delicious/post.rb', line 38 def to_s %Q(Delicious::Post(url: "#{url}", description: "#{description}", tags: #{}, extended: "#{extended}", dt: "#{dt}", shared: #{shared})) end |