Class: Kindle::Parser::Annotations
- Inherits:
-
Object
- Object
- Kindle::Parser::Annotations
- Defined in:
- lib/kindle/parser/annotations.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#books ⇒ Object
readonly
Returns the value of attribute books.
-
#highlights ⇒ Object
Returns the value of attribute highlights.
-
#page ⇒ Object
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Annotations
constructor
A new instance of Annotations.
- #load_highlights ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Annotations
Returns a new instance of Annotations.
19 20 21 22 23 24 25 |
# File 'lib/kindle/parser/annotations.rb', line 19 def initialize(={}) @username = SETTINGS.username || [:username] @password = SETTINGS.password || [:password] @books = [] @highlights = [] load_highlights end |
Instance Attribute Details
#books ⇒ Object (readonly)
Returns the value of attribute books.
17 18 19 |
# File 'lib/kindle/parser/annotations.rb', line 17 def books @books end |
#highlights ⇒ Object
Returns the value of attribute highlights.
16 17 18 |
# File 'lib/kindle/parser/annotations.rb', line 16 def highlights @highlights end |
#page ⇒ Object
Returns the value of attribute page.
16 17 18 |
# File 'lib/kindle/parser/annotations.rb', line 16 def page @page end |
Instance Method Details
#load_highlights ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/kindle/parser/annotations.rb', line 27 def load_highlights # Log in to kindle.amazon.TLD login # Collect the list of books that have highlighted passages fetch_highlights # Because the web interface doesn't show us ALL of the highlights, # we iterate and collect the authoritative highlights for each book end |