Class: Savon::LocalOptions
Instance Attribute Summary
Attributes inherited from Options
Instance Method Summary collapse
-
#advanced_typecasting(advanced) ⇒ Object
Instruct Nori to use advanced typecasting.
-
#attributes(attributes) ⇒ Object
Attributes for the SOAP message tag.
-
#cookies(cookies) ⇒ Object
Cookies to be used for the next request.
-
#initialize(options = {}) ⇒ LocalOptions
constructor
A new instance of LocalOptions.
-
#message(message) ⇒ Object
The SOAP message to send.
-
#message_tag(message_tag) ⇒ Object
SOAP message tag (formerly known as SOAP input tag).
-
#multipart(multipart) ⇒ Object
Instruct Savon to create a multipart response if available.
-
#response_parser(parser) ⇒ Object
Instruct Nori to use :rexml or :nokogiri to parse the response.
-
#soap_action(soap_action) ⇒ Object
Value of the SOAPAction HTTP header.
-
#soap_header(header) ⇒ Object
The local SOAP header.
-
#xml(xml) ⇒ Object
The SOAP request XML to send.
Methods inherited from Options
Constructor Details
#initialize(options = {}) ⇒ LocalOptions
Returns a new instance of LocalOptions.
284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/savon/options.rb', line 284 def initialize( = {}) @option_type = :local defaults = { :advanced_typecasting => true, :response_parser => :nokogiri, :multipart => false } super defaults.merge() end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Savon::Options
Instance Method Details
#advanced_typecasting(advanced) ⇒ Object
Instruct Nori to use advanced typecasting.
335 336 337 |
# File 'lib/savon/options.rb', line 335 def advanced_typecasting(advanced) @options[:advanced_typecasting] = advanced end |
#attributes(attributes) ⇒ Object
Attributes for the SOAP message tag.
315 316 317 |
# File 'lib/savon/options.rb', line 315 def attributes(attributes) @options[:attributes] = attributes end |
#cookies(cookies) ⇒ Object
Cookies to be used for the next request.
325 326 327 |
# File 'lib/savon/options.rb', line 325 def () @options[:cookies] = end |
#message(message) ⇒ Object
The SOAP message to send. Expected to be a Hash or a String.
304 305 306 |
# File 'lib/savon/options.rb', line 304 def () @options[: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.
310 311 312 |
# File 'lib/savon/options.rb', line 310 def () @options[:message_tag] = end |
#multipart(multipart) ⇒ Object
Instruct Savon to create a multipart response if available.
345 346 347 |
# File 'lib/savon/options.rb', line 345 def multipart(multipart) @options[:multipart] = multipart end |
#response_parser(parser) ⇒ Object
Instruct Nori to use :rexml or :nokogiri to parse the response.
340 341 342 |
# File 'lib/savon/options.rb', line 340 def response_parser(parser) @options[:response_parser] = parser end |
#soap_action(soap_action) ⇒ Object
Value of the SOAPAction HTTP header.
320 321 322 |
# File 'lib/savon/options.rb', line 320 def soap_action(soap_action) @options[:soap_action] = soap_action end |
#soap_header(header) ⇒ Object
The local SOAP header. Expected to be a Hash or respond to #to_s. Will be merged with the global SOAP header if both are Hashes. Otherwise the local option will be prefered.
299 300 301 |
# File 'lib/savon/options.rb', line 299 def soap_header(header) @options[:soap_header] = header end |
#xml(xml) ⇒ Object
The SOAP request XML to send. Expected to be a String.
330 331 332 |
# File 'lib/savon/options.rb', line 330 def xml(xml) @options[:xml] = xml end |