Class: Representable::Coercion::Coercer
- Inherits:
-
Object
- Object
- Representable::Coercion::Coercer
- Defined in:
- lib/representable/coercion.rb
Instance Method Summary collapse
- #call(input, _options) ⇒ Object
-
#initialize(type) ⇒ Coercer
constructor
A new instance of Coercer.
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, ) @type.call(input) end |