Class: Mountapi::Schema::Integer

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/mountapi/schema/integer.rb

Overview

Schema implementation for Integer type

Instance Method Summary collapse

Methods included from Base

included

Instance Method Details

#cast(value) ⇒ Object

cast value to integer



10
11
12
13
14
# File 'lib/mountapi/schema/integer.rb', line 10

def cast(value)
  Integer(value)
rescue ArgumentError
  raise_cast_error(value)
end