Class: Materialize::BaseBuilder
- Inherits:
-
Object
- Object
- Materialize::BaseBuilder
- Extended by:
- Concurrent
- Defined in:
- lib/materialize/base_builder.rb
Class Method Summary collapse
- .build(data, repo, options) ⇒ Object
- .build_all(data, repo, options) ⇒ Object
- .entity_class ⇒ Object
Methods included from Concurrent
Class Method Details
.build(data, repo, options) ⇒ Object
6 7 8 |
# File 'lib/materialize/base_builder.rb', line 6 def build(data, repo, ) entity_class.new(data) end |
.build_all(data, repo, options) ⇒ Object
10 11 12 |
# File 'lib/materialize/base_builder.rb', line 10 def build_all(data, repo, ) entity_class.wrap(data) end |
.entity_class ⇒ Object
14 15 16 |
# File 'lib/materialize/base_builder.rb', line 14 def entity_class "Entities::#{entity_base_class_name}".split('::').reduce(Module, :const_get) end |