Class: Representable::Coercion::Coercer

Inherits:
Object
  • Object
show all
Includes:
Virtus
Defined in:
lib/representable/coercion.rb

Instance Method Summary collapse

Instance Method Details

#coerce(name, v) ⇒ Object

TODO: test me.



7
8
9
10
11
# File 'lib/representable/coercion.rb', line 7

def coerce(name, v) # TODO: test me.
  # set and get the value as i don't know where exactly coercion happens in virtus.
  send("#{name}=", v)
  send(name)
end