Class: Chewy::Index::Witchcraft::Cauldron
- Inherits:
-
Object
- Object
- Chewy::Index::Witchcraft::Cauldron
- Defined in:
- lib/chewy/index/witchcraft.rb
Instance Attribute Summary collapse
-
#locals ⇒ Object
readonly
Returns the value of attribute locals.
Instance Method Summary collapse
- #brew(object, crutches = nil, context = {}) ⇒ Object
-
#initialize(index, fields: []) ⇒ Cauldron
constructor
A new instance of Cauldron.
Constructor Details
#initialize(index, fields: []) ⇒ Cauldron
Returns a new instance of Cauldron.
56 57 58 59 60 |
# File 'lib/chewy/index/witchcraft.rb', line 56 def initialize(index, fields: []) @index = index @locals = [] @fields = fields end |
Instance Attribute Details
#locals ⇒ Object (readonly)
Returns the value of attribute locals.
52 53 54 |
# File 'lib/chewy/index/witchcraft.rb', line 52 def locals @locals end |
Instance Method Details
#brew(object, crutches = nil, context = {}) ⇒ Object
62 63 64 |
# File 'lib/chewy/index/witchcraft.rb', line 62 def brew(object, crutches = nil, context = {}) alicorn.call(locals, object, crutches, context).as_json end |