Class: Chewy::Type::Witchcraft::Cauldron

Inherits:
Object
  • Object
show all
Defined in:
lib/chewy/type/witchcraft.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Cauldron

Returns a new instance of Cauldron.



46
47
48
49
# File 'lib/chewy/type/witchcraft.rb', line 46

def initialize(type)
  @type = type
  @locals = []
end

Instance Attribute Details

#localsObject (readonly)

Returns the value of attribute locals.



44
45
46
# File 'lib/chewy/type/witchcraft.rb', line 44

def locals
  @locals
end

Instance Method Details

#brew(object, crutches = nil) ⇒ Object



51
52
53
# File 'lib/chewy/type/witchcraft.rb', line 51

def brew(object, crutches = nil)
  alicorn.call(locals, object, crutches).as_json
end