class ApkgToCsv::Note
Attributes
field_string[R]
model_id[R]
Public Class Methods
from_db(db)
click to toggle source
# File lib/apkg_to_csv/note.rb, line 3 def self.from_db(db) db.execute('SELECT mid, flds FROM notes').map do |model_id, field_string| new(model_id, field_string) end end
new(model_id, field_string)
click to toggle source
# File lib/apkg_to_csv/note.rb, line 11 def initialize(model_id, field_string) @model_id = model_id.to_s @field_string = field_string end
Public Instance Methods
fields()
click to toggle source
# File lib/apkg_to_csv/note.rb, line 16 def fields @fields ||= field_string.split("\x1f") end