lib/yinx/note_meta.rb in yinx-0.1.2 vs lib/yinx/note_meta.rb in yinx-0.1.3
- old
+ new
@@ -3,15 +3,14 @@
class NoteMeta
[:updated, :created, :title, :notebookGuid, :guid, :contentLength, :tagGuids].each do |method|
define_method method do
iv_name = "@#{method}"
- value = instance_variable_get iv_name
- unless value
+ unless instance_variable_defined? iv_name
value = instance_variable_get("@meta").send method
instance_variable_set iv_name, value
end
- value
+ instance_variable_get iv_name
end
end
def initialize meta, note_store
@meta = meta