module Poros::InstanceMethods
Attributes
uuid[W]
Public Instance Methods
==(other)
click to toggle source
# File lib/poros/instance_methods.rb, line 27 def ==(other) uuid == other.uuid end
destroy()
click to toggle source
# File lib/poros/instance_methods.rb, line 14 def destroy File.delete(poros.file_path) self.class.remove_from_index(self) self end
poros()
click to toggle source
# File lib/poros/instance_methods.rb, line 10 def poros @poros ||= Poros::Info.new(self) end
save()
click to toggle source
# File lib/poros/instance_methods.rb, line 20 def save File.write(poros.file_path, poros.to_h.to_yaml) self.class.data_changed = true self.class.update_index(self) self end
uuid()
click to toggle source
# File lib/poros/instance_methods.rb, line 6 def uuid @uuid ||= SecureRandom.uuid end