Class SOAP::Header::HandlerSet
In: soap/header/handlerset.rb
Parent: Object

Methods

<<   add   delete   dup   include?   new   on_inbound   on_outbound   store=  

Public Class methods

[Source]

# File soap/header/handlerset.rb, line 17
  def initialize
    @store = XSD::NamedElements.new
  end

Public Instance methods

<<(handler)

Alias for add

[Source]

# File soap/header/handlerset.rb, line 27
  def add(handler)
    @store << handler
  end

[Source]

# File soap/header/handlerset.rb, line 32
  def delete(handler)
    @store.delete(handler)
  end

[Source]

# File soap/header/handlerset.rb, line 21
  def dup
    obj = HandlerSet.new
    obj.store = @store.dup
    obj
  end

[Source]

# File soap/header/handlerset.rb, line 36
  def include?(handler)
    @store.include?(handler)
  end

headers: SOAPHeaderItem enumerable object

[Source]

# 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

returns: Array of SOAPHeaderItem

[Source]

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

Protected Instance methods

[Source]

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

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

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.