Module: Representable::Coercion::ClassMethods

Defined in:
lib/representable/coercion.rb

Instance Method Summary collapse

Instance Method Details

#build_definition(name, options, &block) ⇒ Object

Representable::Declarative


27
28
29
30
31
32
33
34
# File 'lib/representable/coercion.rb', line 27

def build_definition(name, options, &block) # Representable::Declarative
  return super unless type = options[:type]

  options[:render_filter] << coercer = Coercer.new(type)
  options[:parse_filter]  << coercer

  super
end