Class: Savon::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/savon/header.rb

Instance Method Summary collapse

Constructor Details

#initialize(globals, locals) ⇒ Header

Returns a new instance of Header.



7
8
9
10
11
# File 'lib/savon/header.rb', line 7

def initialize(globals, locals)
  @globals = globals
  @locals = locals
  @wsse = create_wsse
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/savon/header.rb', line 13

def empty?
  to_s.empty?
end

#to_sObject



17
18
19
20
21
22
# File 'lib/savon/header.rb', line 17

def to_s
  return @header if @header

  gyoku_options = { :key_converter => @globals[:convert_request_keys_to] }
  @header = (Hash === header ? Gyoku.xml(header, gyoku_options) : header) + wsse_header
end