Module: Machinist::Caching::ActiveRecord::Blueprint
- Included in:
- ActiveRecord::Blueprint
- Defined in:
- lib/machinist/caching/active_record/blueprint.rb
Instance Method Summary collapse
-
#box(object) ⇒ Object
Box an object for storage in the warehouse.
-
#unbox(id) ⇒ Object
Unbox an object from the warehouse.
Instance Method Details
#box(object) ⇒ Object
Box an object for storage in the warehouse.
6 7 8 |
# File 'lib/machinist/caching/active_record/blueprint.rb', line 6 def box(object) object.id end |
#unbox(id) ⇒ Object
Unbox an object from the warehouse.
11 12 13 |
# File 'lib/machinist/caching/active_record/blueprint.rb', line 11 def unbox(id) @klass.find(id) end |