Class: Readwise::Highlight
- Inherits:
-
Struct
- Object
- Struct
- Readwise::Highlight
- Defined in:
- lib/readwise/highlight.rb
Instance Attribute Summary collapse
-
#book_id ⇒ Object
Returns the value of attribute book_id.
-
#color ⇒ Object
Returns the value of attribute color.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#end_location ⇒ Object
Returns the value of attribute end_location.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#highlight_id ⇒ Object
Returns the value of attribute highlight_id.
-
#highlighted_at ⇒ Object
Returns the value of attribute highlighted_at.
-
#is_discard ⇒ Object
Returns the value of attribute is_discard.
-
#is_favorite ⇒ Object
Returns the value of attribute is_favorite.
-
#location ⇒ Object
Returns the value of attribute location.
-
#location_type ⇒ Object
Returns the value of attribute location_type.
-
#note ⇒ Object
Returns the value of attribute note.
-
#readwise_url ⇒ Object
Returns the value of attribute readwise_url.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#text ⇒ Object
Returns the value of attribute text.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #created_at_time ⇒ Object
- #highlighted_at_time ⇒ Object
- #serialize ⇒ Object
- #updated_at_time ⇒ Object
Instance Attribute Details
#book_id ⇒ Object
Returns the value of attribute book_id
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def book_id @book_id end |
#color ⇒ Object
Returns the value of attribute color
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def color @color end |
#created_at ⇒ Object
Returns the value of attribute created_at
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def created_at @created_at end |
#end_location ⇒ Object
Returns the value of attribute end_location
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def end_location @end_location end |
#external_id ⇒ Object
Returns the value of attribute external_id
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def external_id @external_id end |
#highlight_id ⇒ Object
Returns the value of attribute highlight_id
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def highlight_id @highlight_id end |
#highlighted_at ⇒ Object
Returns the value of attribute highlighted_at
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def highlighted_at @highlighted_at end |
#is_discard ⇒ Object
Returns the value of attribute is_discard
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def is_discard @is_discard end |
#is_favorite ⇒ Object
Returns the value of attribute is_favorite
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def is_favorite @is_favorite end |
#location ⇒ Object
Returns the value of attribute location
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def location @location end |
#location_type ⇒ Object
Returns the value of attribute location_type
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def location_type @location_type end |
#note ⇒ Object
Returns the value of attribute note
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def note @note end |
#readwise_url ⇒ Object
Returns the value of attribute readwise_url
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def readwise_url @readwise_url end |
#tags ⇒ Object
Returns the value of attribute tags
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def @tags end |
#text ⇒ Object
Returns the value of attribute text
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def text @text end |
#updated_at ⇒ Object
Returns the value of attribute updated_at
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url
4 5 6 |
# File 'lib/readwise/highlight.rb', line 4 def url @url end |
Instance Method Details
#created_at_time ⇒ Object
25 26 27 28 29 |
# File 'lib/readwise/highlight.rb', line 25 def created_at_time return unless created_at Time.parse(created_at) end |
#highlighted_at_time ⇒ Object
37 38 39 40 41 |
# File 'lib/readwise/highlight.rb', line 37 def highlighted_at_time return unless highlighted_at Time.parse(highlighted_at) end |
#serialize ⇒ Object
43 44 45 |
# File 'lib/readwise/highlight.rb', line 43 def serialize to_h end |
#updated_at_time ⇒ Object
31 32 33 34 35 |
# File 'lib/readwise/highlight.rb', line 31 def updated_at_time return unless updated_at Time.parse(updated_at) end |