Class: Readwise::Highlight

Inherits:
Struct
  • Object
show all
Defined in:
lib/readwise/highlight.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#book_idObject

Returns the value of attribute book_id

Returns:

  • (Object)

    the current value of book_id



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def book_id
  @book_id
end

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def color
  @color
end

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def created_at
  @created_at
end

#end_locationObject

Returns the value of attribute end_location

Returns:

  • (Object)

    the current value of end_location



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def end_location
  @end_location
end

#external_idObject

Returns the value of attribute external_id

Returns:

  • (Object)

    the current value of external_id



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def external_id
  @external_id
end

#highlight_idObject

Returns the value of attribute highlight_id

Returns:

  • (Object)

    the current value of highlight_id



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def highlight_id
  @highlight_id
end

#highlighted_atObject

Returns the value of attribute highlighted_at

Returns:

  • (Object)

    the current value of highlighted_at



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def highlighted_at
  @highlighted_at
end

#is_discardObject

Returns the value of attribute is_discard

Returns:

  • (Object)

    the current value of is_discard



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def is_discard
  @is_discard
end

#is_favoriteObject

Returns the value of attribute is_favorite

Returns:

  • (Object)

    the current value of is_favorite



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def is_favorite
  @is_favorite
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def location
  @location
end

#location_typeObject

Returns the value of attribute location_type

Returns:

  • (Object)

    the current value of location_type



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def location_type
  @location_type
end

#noteObject

Returns the value of attribute note

Returns:

  • (Object)

    the current value of note



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def note
  @note
end

#readwise_urlObject

Returns the value of attribute readwise_url

Returns:

  • (Object)

    the current value of readwise_url



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def readwise_url
  @readwise_url
end

#tagsObject

Returns the value of attribute tags

Returns:

  • (Object)

    the current value of tags



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def tags
  @tags
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def text
  @text
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



4
5
6
# File 'lib/readwise/highlight.rb', line 4

def url
  @url
end

Instance Method Details

#created_at_timeObject



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_timeObject



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

#serializeObject



43
44
45
# File 'lib/readwise/highlight.rb', line 43

def serialize
  to_h
end

#updated_at_timeObject



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