Class: KindleClippings::ClippingResult
- Inherits:
-
Array
- Object
- Array
- KindleClippings::ClippingResult
- Defined in:
- lib/kindleclippings/clippingresult.rb
Instance Method Summary collapse
- #bookmarks ⇒ Object
- #by_author(author) ⇒ Object
- #by_book(book) ⇒ Object
- #by_date(from, to) ⇒ Object
- #highlights ⇒ Object
- #notes ⇒ Object
Instance Method Details
#bookmarks ⇒ Object
13 14 15 |
# File 'lib/kindleclippings/clippingresult.rb', line 13 def bookmarks filter_by_property(:type, :Bookmark) end |
#by_author(author) ⇒ Object
17 18 19 |
# File 'lib/kindleclippings/clippingresult.rb', line 17 def () filter_by_property(:author, ) end |
#by_book(book) ⇒ Object
21 22 23 |
# File 'lib/kindleclippings/clippingresult.rb', line 21 def by_book(book) filter_by_property(:book_title, book) end |
#by_date(from, to) ⇒ Object
25 26 27 28 |
# File 'lib/kindleclippings/clippingresult.rb', line 25 def by_date(from, to) return self unless from && to self.select { |annotation| annotation.added_on >= from && annotation.added_on <= to } end |
#highlights ⇒ Object
5 6 7 |
# File 'lib/kindleclippings/clippingresult.rb', line 5 def highlights filter_by_property(:type, :Highlight) end |
#notes ⇒ Object
9 10 11 |
# File 'lib/kindleclippings/clippingresult.rb', line 9 def notes filter_by_property(:type, :Note) end |