In: |
soap/baseData.rb
|
Parent: | XSD::NSDBase |
# File soap/baseData.rb, line 391 def self.decode(elename, type) s = SOAPStruct.new(type) s.elename = elename s end
# File soap/baseData.rb, line 328 def initialize(type = nil) super(type || XSD::QName.new) @array = [] @data = [] end
# File soap/baseData.rb, line 346 def [](idx) if idx.is_a?(Range) @data[idx] elsif idx.is_a?(Integer) if (idx > @array.size) raise ArrayIndexOutOfBoundsError.new('In ' << @type.name) end @data[idx] else if @array.include?(idx) @data[@array.index(idx)] else nil end end end
# File soap/baseData.rb, line 363 def []=(idx, data) if @array.include?(idx) @data[@array.index(idx)] = data else add(idx, data) end end
# File soap/baseData.rb, line 379 def each for i in 0..(@array.length - 1) yield(@array[i], @data[i]) end end