Module: Poros::InstanceMethods
- Included in:
- Poros
- Defined in:
- lib/poros/instance_methods.rb
Instance Attribute Summary collapse
-
#uuid ⇒ Object
Returns the value of attribute uuid.
Instance Method Summary collapse
Instance Attribute Details
#uuid ⇒ Object
Returns the value of attribute uuid.
4 5 6 |
# File 'lib/poros/instance_methods.rb', line 4 def uuid @uuid end |
Instance Method Details
#destroy ⇒ Object
13 14 15 16 17 |
# File 'lib/poros/instance_methods.rb', line 13 def destroy File.delete(poros.file_path) self.class.remove_from_index(self) self end |
#poros ⇒ Object
9 10 11 |
# File 'lib/poros/instance_methods.rb', line 9 def poros @poros ||= Poros::Info.new(self) end |
#save ⇒ Object
19 20 21 22 23 24 |
# File 'lib/poros/instance_methods.rb', line 19 def save File.write(poros.file_path, poros.to_h.to_yaml) self.class.data_changed = true self.class.update_index(self) self end |