Class: GoogleReaderApi::Entry
- Inherits:
-
Object
- Object
- GoogleReaderApi::Entry
- Defined in:
- lib/google-reader-api-uniq/entry.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Instance Method Summary collapse
-
#initialize(api, entry) ⇒ Entry
constructor
A new instance of Entry.
- #to_s ⇒ Object
- #toggle_like ⇒ Object
- #toggle_read ⇒ Object
- #toggle_star ⇒ Object
Constructor Details
#initialize(api, entry) ⇒ Entry
Returns a new instance of Entry.
6 7 8 |
# File 'lib/google-reader-api-uniq/entry.rb', line 6 def initialize(api,entry) @api, @entry = api, entry end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
4 5 6 |
# File 'lib/google-reader-api-uniq/entry.rb', line 4 def entry @entry end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/google-reader-api-uniq/entry.rb', line 22 def to_s "<<Entry: #{@entry.title.content} >>" end |
#toggle_like ⇒ Object
14 15 16 |
# File 'lib/google-reader-api-uniq/entry.rb', line 14 def toggle_like edit_tag 'user/-/state/com.google/like' end |
#toggle_read ⇒ Object
10 11 12 |
# File 'lib/google-reader-api-uniq/entry.rb', line 10 def toggle_read edit_tag 'user/-/state/com.google/read' end |
#toggle_star ⇒ Object
18 19 20 |
# File 'lib/google-reader-api-uniq/entry.rb', line 18 def toggle_star edit_tag 'user/-/state/com.google/starred' end |