Class: WSDL::Reader::Bindings

Inherits:
Hash
  • Object
show all
Defined in:
lib/wsdl-reader/binding.rb

Instance Method Summary collapse

Methods inherited from Hash

#keys_to_sym!, #kvTable

Instance Method Details

#all_operationsObject



22
23
24
# File 'lib/wsdl-reader/binding.rb', line 22

def all_operations
  self.map { |_, binding| binding.operations.keys }.flatten
end

#get_binding_for_operation_name(binding_name = nil, operation_name) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/wsdl-reader/binding.rb', line 4

def get_binding_for_operation_name(binding_name = nil, operation_name)
  if binding_name.nil?
    self.map do |_, binding|
      binding if binding.operation?(operation_name)
    end.flatten
  else
    [self[binding_name]] if self[binding_name].operation?(operation_name)
  end
end

#get_operations(binding_name = nil) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/wsdl-reader/binding.rb', line 14

def get_operations(binding_name = nil)
  if binding_name.nil?
    all_operations
  else
    self[binding_name].operations.keys
  end
end