public Method

SOAPArray.[]=(*idxary)

There's no documentation for this item.

Source Code

# File 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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.