Class: MongoMapper::Document::VeneerInterface::InstanceWrapper
- Inherits:
-
Veneer::Base::InstanceWrapper
- Object
- Veneer::Base::InstanceWrapper
- MongoMapper::Document::VeneerInterface::InstanceWrapper
- Defined in:
- lib/veneer/adapters/mongomapper/instance_wrapper.rb
Instance Attribute Summary
Attributes inherited from Veneer::Base::InstanceWrapper
Instance Method Summary collapse
Methods inherited from Veneer::Base::InstanceWrapper
#==, #class, #initialize, #method_missing, #update!
Constructor Details
This class inherits a constructor from Veneer::Base::InstanceWrapper
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Veneer::Base::InstanceWrapper
Instance Method Details
#save ⇒ Object
13 14 15 16 17 |
# File 'lib/veneer/adapters/mongomapper/instance_wrapper.rb', line 13 def save instance.save rescue ::Veneer::Errors::BeforeSaveError => e handle_before_save_error(e) end |
#save! ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/veneer/adapters/mongomapper/instance_wrapper.rb', line 5 def save! instance.save! rescue ::Veneer::Errors::BeforeSaveError => e raise ::Veneer::Errors::NotSaved, e. rescue => e raise ::Veneer::Errors::NotSaved, e. end |
#update(*args) ⇒ Object
19 20 21 22 23 |
# File 'lib/veneer/adapters/mongomapper/instance_wrapper.rb', line 19 def update(*args) instance.update(*args) rescue ::Veneer::Errors::BeforeSaveError => e handle_before_save_error(e) end |