Class: Tito::Types::IntegerArray
- Inherits:
-
ActiveModel::Type::Value
- Object
- ActiveModel::Type::Value
- Tito::Types::IntegerArray
- Defined in:
- lib/tito/types/integer_array.rb
Instance Method Summary collapse
Instance Method Details
#cast(value) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/tito/types/integer_array.rb', line 6 def cast(value) case value when Array then value.map(&:to_i) when nil then nil else [value.to_i] end end |
#type ⇒ Object
4 |
# File 'lib/tito/types/integer_array.rb', line 4 def type = :integer_array |