Module: Savon::Model

Defined in:
lib/savon/model.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



5
6
7
# File 'lib/savon/model.rb', line 5

def self.extended(base)
  base.setup
end

Instance Method Details

#all_operationsObject



23
24
25
# File 'lib/savon/model.rb', line 23

def all_operations
  operations(*client.operations)
end

#operations(*operations) ⇒ Object

Accepts one or more SOAP operations and generates both class and instance methods named after the given operations. Each generated method accepts an optional SOAP message Hash.



16
17
18
19
20
21
# File 'lib/savon/model.rb', line 16

def operations(*operations)
  operations.each do |operation|
    define_class_operation(operation)
    define_instance_operation(operation)
  end
end

#setupObject



9
10
11
12
# File 'lib/savon/model.rb', line 9

def setup
  class_operation_module
  instance_operation_module
end