Class: Savon::LocalOptions
- Includes:
- SharedOptions
- Defined in:
- lib/savon/options.rb
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.
- #headers(headers) ⇒ Object
-
#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 included from SharedOptions
#wsse_auth, #wsse_signature, #wsse_timestamp
Methods inherited from Options
Constructor Details
#initialize(options = {}) ⇒ LocalOptions
Returns a new instance of LocalOptions.
364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/savon/options.rb', line 364 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.
415 416 417 |
# File 'lib/savon/options.rb', line 415 def advanced_typecasting(advanced) @options[:advanced_typecasting] = advanced end |
#attributes(attributes) ⇒ Object
Attributes for the SOAP message tag.
395 396 397 |
# File 'lib/savon/options.rb', line 395 def attributes(attributes) @options[:attributes] = attributes end |
#cookies(cookies) ⇒ Object
Cookies to be used for the next request.
405 406 407 |
# File 'lib/savon/options.rb', line 405 def () @options[:cookies] = end |
#headers(headers) ⇒ Object
429 430 431 |
# File 'lib/savon/options.rb', line 429 def headers(headers) @options[:headers] = headers end |
#message(message) ⇒ Object
The SOAP message to send. Expected to be a Hash or a String.
384 385 386 |
# File 'lib/savon/options.rb', line 384 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.
390 391 392 |
# File 'lib/savon/options.rb', line 390 def () @options[:message_tag] = end |
#multipart(multipart) ⇒ Object
Instruct Savon to create a multipart response if available.
425 426 427 |
# File 'lib/savon/options.rb', line 425 def multipart(multipart) @options[:multipart] = multipart end |
#response_parser(parser) ⇒ Object
Instruct Nori to use :rexml or :nokogiri to parse the response.
420 421 422 |
# File 'lib/savon/options.rb', line 420 def response_parser(parser) @options[:response_parser] = parser end |
#soap_action(soap_action) ⇒ Object
Value of the SOAPAction HTTP header.
400 401 402 |
# File 'lib/savon/options.rb', line 400 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.
379 380 381 |
# File 'lib/savon/options.rb', line 379 def soap_header(header) @options[:soap_header] = header end |
#xml(xml) ⇒ Object
The SOAP request XML to send. Expected to be a String.
410 411 412 |
# File 'lib/savon/options.rb', line 410 def xml(xml) @options[:xml] = xml end |