public Method

SOAPArray.soap2array(ary) { |v| ... }

There's no documentation for this item.

Source Code

# File soap/baseData.rb, line 818
def soap2array(ary)
  traverse_data(@data) do |v, *position|
    iteary = ary
    rank = 1
    while rank < position.size
      idx = position[rank - 1]
      if iteary[idx].nil?
        iteary = iteary[idx] = Array.new
      else
        iteary = iteary[idx]
      end
      rank += 1
    end
    if block_given?
      iteary[position.last] = yield(v)
    else
      iteary[position.last] = v
    end
  end
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.