class SOAP::SOAPHeader
Attributes
force_encode[W]
Public Class Methods
new()
click to toggle source
Calls superclass method
SOAP::SOAPStruct::new
# File lib/soap/element.rb, line 195 def initialize super(nil) @elename = EleHeaderName @encodingstyle = nil @force_encode = false end
Public Instance Methods
add(name, value)
click to toggle source
Calls superclass method
SOAP::SOAPStruct#add
# File lib/soap/element.rb, line 211 def add(name, value) actor = value.extraattr[AttrActorName] mu = value.extraattr[AttrMustUnderstandName] encstyle = value.extraattr[AttrEncodingStyleName] mu_value = mu.nil? ? nil : (mu == '1') # to remove mustUnderstand attribute, set it to nil item = SOAPHeaderItem.new(value, mu_value, encstyle, actor) super(name, item) end
encode(generator, ns, attrs = {}) { |data| ... }
click to toggle source
# File lib/soap/element.rb, line 202 def encode(generator, ns, attrs = {}) name = ns.name(@elename) generator.encode_tag(name, attrs) @data.each do |data| yield(data) end generator.encode_tag_end(name, @data.size > 0) end
encode?()
click to toggle source
# File lib/soap/element.rb, line 226 def encode? @force_encode or length > 0 end
length()
click to toggle source
# File lib/soap/element.rb, line 221 def length @data.length end
Also aliased as: size