Class: GoogleReaderApi::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/google-reader-api-uniq/entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#entryObject (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_sObject



22
23
24
# File 'lib/google-reader-api-uniq/entry.rb', line 22

def to_s
  "<<Entry: #{@entry.title.content} >>"
end

#toggle_likeObject



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_readObject



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_starObject



18
19
20
# File 'lib/google-reader-api-uniq/entry.rb', line 18

def toggle_star
  edit_tag 'user/-/state/com.google/starred'
end