Method: Kafo::DataTypes::Struct#initialize
- Defined in:
- lib/kafo/data_types/struct.rb
#initialize(spec) ⇒ Struct
Returns a new instance of Struct.
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/kafo/data_types/struct.rb', line 4 def initialize(spec) @spec = ::Hash[spec.map do |k,v| begin k = DataType.new_from_string(k) rescue ConfigurationException; end begin v = DataType.new_from_string(v) rescue ConfigurationException; end [k, v] end] end |