lib/yinx/note_meta.rb in yinx-0.1.3 vs lib/yinx/note_meta.rb in yinx-0.1.4

- old
+ new

@@ -1,8 +1,10 @@ require 'evernote-thrift' +require 'yinx/hash' +require 'yinx/array' -class NoteMeta +class Yinx::NoteMeta [:updated, :created, :title, :notebookGuid, :guid, :contentLength, :tagGuids].each do |method| define_method method do iv_name = "@#{method}" unless instance_variable_defined? iv_name @@ -14,9 +16,13 @@ end def initialize meta, note_store @meta = meta @store = note_store + end + + def self.raw + new nil, nil end def tags @tags ||= (tagGuids ? tagGuids.map{|id| @store.tag_name id} : []) end