Module: Materializer::Base::ClassMethods
- Defined in:
- lib/materializer/base.rb
Instance Method Summary collapse
-
#add_materializer(options) ⇒ Object
Add a materializer profile.
-
#materialize(options) ⇒ Object
Instruct the class, on save to materialize using a method into a particular attribute.
Instance Method Details
#add_materializer(options) ⇒ Object
Add a materializer profile.
32 33 34 35 36 |
# File 'lib/materializer/base.rb', line 32 def add_materializer() # :nodoc: materializers = self.send(:materializers) materializers << self.send(:materializers=, materializers) end |
#materialize(options) ⇒ Object
Instruct the class, on save to materialize using a method into a particular attribute.
25 26 27 28 |
# File 'lib/materializer/base.rb', line 25 def materialize() self.send(:materializers=, []) if self.send(:materializers).nil? self.add_materializer() end |