Class: Superstore::Types::ArrayType

Inherits:
BaseType
  • Object
show all
Defined in:
lib/superstore/types/array_type.rb

Instance Attribute Summary

Attributes inherited from BaseType

#model, #options

Instance Method Summary collapse

Methods inherited from BaseType

#encode, #initialize

Constructor Details

This class inherits a constructor from Superstore::Types::BaseType

Instance Method Details

#decode(val) ⇒ Object



4
5
6
# File 'lib/superstore/types/array_type.rb', line 4

def decode(val)
  val unless val.blank?
end

#typecast(value) ⇒ Object



8
9
10
# File 'lib/superstore/types/array_type.rb', line 8

def typecast(value)
  value.to_a
end