class Evernote2org::Enex
Attributes
doc[RW]
notes[RW]
path[RW]
Public Class Methods
new(path)
click to toggle source
# File lib/evernote2org/enex.rb, line 8 def initialize(path) @path = path @notes = [] end
parse(path)
click to toggle source
# File lib/evernote2org/enex.rb, line 29 def parse(path) new(path).parse! end
Public Instance Methods
export_to(out_dir)
click to toggle source
# File lib/evernote2org/enex.rb, line 24 def export_to(out_dir) @notes.each { |note| note.export_to(out_dir) } end
parse!()
click to toggle source
# File lib/evernote2org/enex.rb, line 13 def parse! File.open(@path) do |file| @doc = Nokogiri::XML(file) @notes = @doc.css("note").map do |note_content| Note.new(note_content) end end self end