Class: Savon::LocalOptions

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

Instance Method Summary collapse

Methods inherited from Options

#[], #[]=, #include?

Constructor Details

#initialize(options = {}) ⇒ LocalOptions

Returns a new instance of LocalOptions.



224
225
226
227
228
229
230
231
# File 'lib/savon/options.rb', line 224

def initialize(options = {})
  defaults = {
    :advanced_typecasting => true,
    :response_parser      => :nokogiri
  }

  super defaults.merge(options)
end

Instance Method Details

#advanced_typecasting(advanced) ⇒ Object

Instruct Nori to use advanced typecasting.



255
256
257
# File 'lib/savon/options.rb', line 255

def advanced_typecasting(advanced)
  @options[:advanced_typecasting] = advanced
end

#message(message) ⇒ Object

The SOAP message to send. Expected to be a Hash or a String.



234
235
236
# File 'lib/savon/options.rb', line 234

def message(message)
  @options[:message] = message
end

#message_tag(message_tag) ⇒ Object

SOAP message tag (formerly known as SOAP input tag). If it's not set, Savon retrieves the name from the WSDL document (if available). Otherwise, Gyoku converts the operation name into an XML element.



240
241
242
# File 'lib/savon/options.rb', line 240

def message_tag(message_tag)
  @options[:message_tag] = message_tag
end

#response_parser(parser) ⇒ Object

Instruct Nori to use :rexml or :nokogiri to parse the response.



260
261
262
# File 'lib/savon/options.rb', line 260

def response_parser(parser)
  @options[:response_parser] = parser
end

#soap_action(soap_action) ⇒ Object

Value of the SOAPAction HTTP header.



245
246
247
# File 'lib/savon/options.rb', line 245

def soap_action(soap_action)
  @options[:soap_action] = soap_action
end

#xml(xml) ⇒ Object

The SOAP request XML to send. Expected to be a String.



250
251
252
# File 'lib/savon/options.rb', line 250

def xml(xml)
  @options[:xml] = xml
end