Module: Symbiont::SoapObject

Defined in:
lib/symbiont/soap_methods.rb,
lib/symbiont/service_objects.rb

Defined Under Namespace

Modules: SoapMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object (private)



46
47
48
49
50
51
# File 'lib/symbiont/service_objects.rb', line 46

def method_missing(*args)
  operation = args.shift
  message = args.shift
  type = message.is_a?(String) ? :xml : :message
  call(operation, type => message)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



6
7
8
# File 'lib/symbiont/service_objects.rb', line 6

def response
  @response
end

Class Method Details

.included(caller) ⇒ Object



8
9
10
# File 'lib/symbiont/service_objects.rb', line 8

def self.included(caller)
  caller.extend SoapMethods
end

Instance Method Details

#bodyObject



28
29
30
# File 'lib/symbiont/service_objects.rb', line 28

def body
  response.body
end

#connected?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/symbiont/service_objects.rb', line 16

def connected?
  !@client.nil?
end

#docObject



24
25
26
# File 'lib/symbiont/service_objects.rb', line 24

def doc
  response.doc
end

#initializeObject



12
13
14
# File 'lib/symbiont/service_objects.rb', line 12

def initialize
  @client = Savon.client(client_properties)
end

#operationsObject



20
21
22
# File 'lib/symbiont/service_objects.rb', line 20

def operations
  @client.operations
end

#to_hashObject



40
41
42
# File 'lib/symbiont/service_objects.rb', line 40

def to_hash
  response.hash
end

#to_xmlObject



36
37
38
# File 'lib/symbiont/service_objects.rb', line 36

def to_xml
  response.to_xml
end

#xpath(node) ⇒ Object



32
33
34
# File 'lib/symbiont/service_objects.rb', line 32

def xpath(node)
  response.xpath(node)
end