Class: TypedFields::ArrayType

Inherits:
Object
  • Object
show all
Defined in:
lib/typed_fields.rb

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ ArrayType

Returns a new instance of ArrayType.



40
41
42
# File 'lib/typed_fields.rb', line 40

def initialize type
  @type = type
end

Instance Method Details

#parse(obj) ⇒ Object



44
45
46
47
# File 'lib/typed_fields.rb', line 44

def parse obj
  return nil if obj.nil?
  obj.map{|o| @type.parse o}
end