Class: Alchemrest::Transforms::JsonNumber
- Inherits:
-
Morpher::Transform
- Object
- Morpher::Transform
- Alchemrest::Transforms::JsonNumber
- Defined in:
- lib/alchemrest/transforms/json_number.rb
Instance Method Summary collapse
Instance Method Details
#call(input) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/alchemrest/transforms/json_number.rb', line 6 def call(input) if input.instance_of?(Integer) || input.instance_of?(Float) success(input) else failure_error(input) end end |