Method: Morpher::Transform::Primitive#call
- Defined in:
- lib/morpher/transform.rb
#call(input) ⇒ Either<Error, Object>
Apply transformation to input
214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/morpher/transform.rb', line 214 def call(input) if input.instance_of?(primitive) success(input) else failure( error( input: input, message: MESSAGE % { actual: input.class, expected: primitive } ) ) end end |