Module: Representable::CreateObject

Defined in:
lib/representable/deserializer.rb

Constant Summary collapse

Instance =
->(input, options) { options[:binding].evaluate_option(:instance, input, options)||
raise( DeserializeError.new(":instance did not return class constant for `#{options[:binding].name}`.")) }
Class =
->(input, options) do
  object_class = options[:binding].evaluate_option(:class, input, options) ||
    raise( DeserializeError.new(":class did not return class constant for `#{options[:binding].name}`."))
  object_class.new
end
Populator =

FIXME: no additional args passed here, yet.

->(*) { raise "Populator: implement me!" }