Class: Representable::Coercion::Coercer

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

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Coercer

Returns a new instance of Coercer.



10
11
12
# File 'lib/representable/coercion.rb', line 10

def initialize(type)
  @type = type
end

Instance Method Details

#call(input, _options) ⇒ Object



14
15
16
# File 'lib/representable/coercion.rb', line 14

def call(input, _options)
  @type.call(input)
end