Class: SOAP::Mapping::Object
Overview
For anyType object: SOAP::Mapping::Object not ::Object
Instance Method Summary collapse
- #[](qname) ⇒ Object
- #[]=(qname, value) ⇒ Object
- #__add_xmlele_value(qname, value) ⇒ Object
- #__xmlattr ⇒ Object
- #__xmlele ⇒ Object
-
#initialize ⇒ Object
constructor
A new instance of Object.
- #inspect ⇒ Object
- #marshal_load(dumpobj) ⇒ Object
Constructor Details
#initialize ⇒ Object
Returns a new instance of Object.
34 35 36 37 38 |
# File 'lib/soap/mapping/registry.rb', line 34 def initialize @__xmlele_type = {} @__xmlele = [] @__xmlattr = {} end |
Instance Method Details
#[](qname) ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/soap/mapping/registry.rb', line 53 def [](qname) qname = Mapping.to_qname(qname) @__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 |
#[]=(qname, value) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/soap/mapping/registry.rb', line 65 def []=(qname, value) qname = Mapping.to_qname(qname) 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 |
#__add_xmlele_value(qname, value) ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/soap/mapping/registry.rb', line 81 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 |
#__xmlattr ⇒ Object
45 46 47 |
# File 'lib/soap/mapping/registry.rb', line 45 def __xmlattr @__xmlattr end |
#__xmlele ⇒ Object
49 50 51 |
# File 'lib/soap/mapping/registry.rb', line 49 def __xmlele @__xmlele end |
#inspect ⇒ Object
40 41 42 43 |
# File 'lib/soap/mapping/registry.rb', line 40 def inspect sprintf("#<%s:0x%x%s>", self.class.name, __id__, @__xmlele.collect { |name, value| " #{name}=#{value.inspect}" }.join) end |
#marshal_load(dumpobj) ⇒ Object
99 100 101 |
# File 'lib/soap/mapping/registry.rb', line 99 def marshal_load(dumpobj) __import(dumpobj) end |