Class: SOAP::SOAPHeaderItem
- Includes:
- SOAPCompoundtype, SOAPEnvelopeElement
- Defined in:
- lib/soap/element.rb
Constant Summary
Constants included from SOAP
AttrActor, AttrArrayType, AttrArrayTypeName, AttrEncodingStyle, AttrEncodingStyleName, AttrMustUnderstand, AttrMustUnderstandName, AttrOffset, AttrOffsetName, AttrPosition, AttrPositionName, AttrRoot, AttrRootName, Base64Literal, EleBody, EleBodyName, EleEnvelope, EleEnvelopeName, EleFault, EleFaultActor, EleFaultActorName, EleFaultCode, EleFaultCodeName, EleFaultDetail, EleFaultDetailName, EleFaultName, EleFaultString, EleFaultStringName, EleHeader, EleHeaderName, EncodingNamespace, EnvelopeNamespace, LiteralNamespace, MediaType, NextActor, PropertyName, SOAPNamespaceTag, TypeMap, VERSION, ValueArray, ValueArrayName, XSDNamespaceTag, XSINamespaceTag
Instance Attribute Summary collapse
-
#element ⇒ Object
Returns the value of attribute element.
-
#encodingstyle ⇒ Object
Returns the value of attribute encodingstyle.
-
#mustunderstand ⇒ Object
Returns the value of attribute mustunderstand.
Attributes included from SOAPType
#definedtype, #elename, #extraattr, #id, #parent, #position, #precedents, #root
Instance Method Summary collapse
- #encode(generator, ns, attrs = {}) {|@element| ... } ⇒ Object
-
#initialize(element, mustunderstand = true, encodingstyle = nil) ⇒ SOAPHeaderItem
constructor
A new instance of SOAPHeaderItem.
Methods included from SOAPType
Constructor Details
#initialize(element, mustunderstand = true, encodingstyle = nil) ⇒ SOAPHeaderItem
Returns a new instance of SOAPHeaderItem.
155 156 157 158 159 160 161 162 |
# File 'lib/soap/element.rb', line 155 def initialize(element, mustunderstand = true, encodingstyle = nil) super() @type = nil @element = element @mustunderstand = mustunderstand @encodingstyle = encodingstyle element.parent = self if element end |
Instance Attribute Details
#element ⇒ Object
Returns the value of attribute element
151 152 153 |
# File 'lib/soap/element.rb', line 151 def element @element end |
#encodingstyle ⇒ Object
Returns the value of attribute encodingstyle
153 154 155 |
# File 'lib/soap/element.rb', line 153 def encodingstyle @encodingstyle end |
#mustunderstand ⇒ Object
Returns the value of attribute mustunderstand
152 153 154 |
# File 'lib/soap/element.rb', line 152 def mustunderstand @mustunderstand end |
Instance Method Details
#encode(generator, ns, attrs = {}) {|@element| ... } ⇒ Object
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/soap/element.rb', line 164 def encode(generator, ns, attrs = {}) attrs.each do |key, value| @element.extraattr[key] = value end @element.extraattr[ns.name(AttrMustUnderstandName)] = (@mustunderstand ? '1' : '0') if @encodingstyle @element.extraattr[ns.name(AttrEncodingStyleName)] = @encodingstyle end @element.encodingstyle = @encodingstyle if !@element.encodingstyle yield(@element) end |