class Avromatic::Model::Types::IntegerType
Constants
- VALUE_CLASSES
Public Instance Methods
coerce(input)
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 19 def coerce(input) if input.nil? || input.is_a?(::Integer) input else raise ArgumentError.new("Could not coerce '#{input.inspect}' to #{name}") end end
coercible?(input)
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 27 def coercible?(input) input.nil? || input.is_a?(::Integer) end
Also aliased as: coerced?
name()
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 15 def name 'integer' end
referenced_model_classes()
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 37 def referenced_model_classes EMPTY_ARRAY end
serialize(value, _strict)
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 33 def serialize(value, _strict) value end
value_classes()
click to toggle source
# File lib/avromatic/model/types/integer_type.rb, line 11 def value_classes VALUE_CLASSES end