class DayoneToQuiver::Converter

Attributes

entry[R]
note[R]

Public Class Methods

new(entry, note) click to toggle source
# File lib/dayone_to_quiver/converter.rb, line 5
def initialize(entry, note)
  @entry = entry
  @note = note
  with_photo if @entry.photo?
end

Public Instance Methods

store() click to toggle source
# File lib/dayone_to_quiver/converter.rb, line 21
def store
  @note.store
end
with_photo() click to toggle source
# File lib/dayone_to_quiver/converter.rb, line 12
def with_photo
  @note.src_resources = [@entry.photo]
  image_url = File.basename(@note.resources.first['dist'])
  link_str = "![#{image_url}](quiver-image-url/#{image_url})"
  @note.cells.last['data'] << "\n\n #{link_str}"
  self
end