Class SOAP::Mapping::Object
In: soap/mapping/registry.rb
Parent: Object

For anyType object: SOAP::Mapping::Object not ::Object

Methods

[]   []=   __add_xmlele_value   __xmlattr   __xmlele   inspect   new  

Included Modules

Marshallable

Public Class methods

[Source]

# File soap/mapping/registry.rb, line 65
  def initialize
    @__xmlele_type = {}
    @__xmlele = []
    @__xmlattr = {}
  end

Public Instance methods

[Source]

# File soap/mapping/registry.rb, line 84
  def [](qname)
    unless qname.is_a?(XSD::QName)
      qname = XSD::QName.new(nil, qname)
    end
    @__xmlele.each do |k, v|
      return v if k == qname
    end
    # fallback
    @__xmlele.each do |k, v|
      return v if k.name == qname.name
    end
    nil
  end

[Source]

# File soap/mapping/registry.rb, line 98
  def []=(qname, value)
    unless qname.is_a?(XSD::QName)
      qname = XSD::QName.new(nil, qname)
    end
    found = false
    @__xmlele.each do |pair|
      if pair[0] == qname
        found = true
        pair[1] = value
      end
    end
    unless found
      __define_attr_accessor(qname)
      @__xmlele << [qname, value]
    end
    @__xmlele_type[qname] = :single
  end

[Source]

# File soap/mapping/registry.rb, line 116
  def __add_xmlele_value(qname, value)
    found = false
    @__xmlele.map! do |k, v|
      if k == qname
        found = true
        [k, __set_xmlele_value(k, v, value)]
      else
        [k, v]
      end
    end
    unless found
      __define_attr_accessor(qname)
      @__xmlele << [qname, value]
      @__xmlele_type[qname] = :single
    end
    value
  end

[Source]

# File soap/mapping/registry.rb, line 76
  def __xmlattr
    @__xmlattr
  end

[Source]

# File soap/mapping/registry.rb, line 80
  def __xmlele
    @__xmlele
  end

[Source]

# File soap/mapping/registry.rb, line 71
  def inspect
    sprintf("#<%s:0x%x%s>", self.class.name, __id__,
      @__xmlele.collect { |name, value| " #{name}=#{value.inspect}" }.join)
  end

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.