Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • soap/header/handlerset.rb

Class/Module Index [+]

Quicksearch

SOAP::Header::HandlerSet

Public Class Methods

new() click to toggle source
 
               # File soap/header/handlerset.rb, line 17
def initialize
  @store = XSD::NamedElements.new
end
            

Public Instance Methods

<<(handler) click to toggle source
Alias for: add
add(handler) click to toggle source
 
               # File soap/header/handlerset.rb, line 27
def add(handler)
  @store << handler
end
            
Also aliased as: <<
delete(handler) click to toggle source
 
               # File soap/header/handlerset.rb, line 32
def delete(handler)
  @store.delete(handler)
end
            
dup() click to toggle source
 
               # File soap/header/handlerset.rb, line 21
def dup
  obj = HandlerSet.new
  obj.store = @store.dup
  obj
end
            
include?(handler) click to toggle source
 
               # File soap/header/handlerset.rb, line 36
def include?(handler)
  @store.include?(handler)
end
            
on_inbound(headers) click to toggle source

headers: SOAPHeaderItem enumerable object

 
               # File soap/header/handlerset.rb, line 48
def on_inbound(headers)
  headers.each do |name, item|
    handler = @store.find { |handler|
      handler.elename == item.element.elename
    }
    if handler
      handler.on_inbound_headeritem(item)
    elsif item.mustunderstand
      raise UnhandledMustUnderstandHeaderError.new(item.element.elename.to_s)
    end
  end
end
            
on_outbound() click to toggle source

returns: Array of SOAPHeaderItem

 
               # File soap/header/handlerset.rb, line 41
def on_outbound
  @store.collect { |handler|
    handler.on_outbound_headeritem
  }.compact
end
            

Protected Instance Methods

store=(store) click to toggle source
 
               # File soap/header/handlerset.rb, line 63
def store=(store)
  @store = store
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus