method

[]=

Importance_0
v1_8_6_287 - Show latest stable - 0 notes - Class: SOAP::SOAPArray
[]=(*idxary) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/baseData.rb, line 737
  def []=(*idxary)
    value = idxary.slice!(-1)

    if idxary.size != @rank
      raise ArgumentError.new("given #{idxary.size} params(#{idxary})" +
        " does not match rank: #{@rank}")
    end

    idx = 0
    while idx < idxary.size
      if idxary[idx] + 1 > @size[idx]
        @size[idx] = idxary[idx] + 1
      end
      idx += 1
    end

    data = retrieve(idxary[0, idxary.size - 1])
    data[idxary.last] = value

    if value.is_a?(SOAPType)
      value.elename = ITEM_NAME
      # Sync type
      unless @type.name
        @type = XSD::QName.new(value.type.namespace,
          SOAPArray.create_arytype(value.type.name, @rank))
      end
      value.type ||= @type
    end

    @offset = idxary
    value.parent = self if value.respond_to?(:parent=)
    offsetnext
  end
Register or log in to add new notes.