Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/rxsd/builtin_types.rb
Overview
Array, String, Time can be instantiated as is
Class Method Summary collapse
-
.from_s(str, item_type) ⇒ Object
Convert string to array and return.
Class Method Details
.from_s(str, item_type) ⇒ Object
Convert string to array and return.
-
str should be the string encoded array
-
item_type should be the class on which to invoke from_s on each array item
21 22 23 24 25 26 27 |
# File 'lib/rxsd/builtin_types.rb', line 21 def self.from_s(str, item_type) arr = [] str.split.each { |i| arr.push item_type.from_s(i) } return arr end |