Class: TypedFields::ArrayType
- Inherits:
-
Object
- Object
- TypedFields::ArrayType
- Defined in:
- lib/typed_fields.rb
Instance Method Summary collapse
-
#initialize(type) ⇒ ArrayType
constructor
A new instance of ArrayType.
- #parse(obj) ⇒ Object
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 |