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

### Methods

<< add delete dup include? new on_inbound on_outbound

### Public Class methods

new()

[Source]

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

### Public Instance methods

<<(handler)

Alias for add

add(handler)

[Source]

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

delete(handler)

[Source]

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

dup()

[Source]

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

include?(handler)

[Source]

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

on_inbound(headers)

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

on_outbound()

returns: Array of SOAPHeaderItem

[Source]

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

[Validate]