Class: WsdlMapper::SvcDesc::Wsdl11::PortType

Inherits:
Base
  • Object
show all
Defined in:
lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb

Defined Under Namespace

Classes: InputOutput, Operation

Instance Attribute Summary

Attributes inherited from Base

#documentation, #name

Instance Method Summary (collapse)

Constructor Details

- (PortType) initialize(name)

Returns a new instance of PortType



32
33
34
35
36
37
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 32

def initialize(name)
  super name
  @operations = WsdlMapper::Dom::Directory.new do |name|
    []
  end
end

Instance Method Details

- (Object) add_operation(operation)



43
44
45
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 43

def add_operation(operation)
  @operations[operation.name] << operation
end

- (Object) each_operation(&block)



39
40
41
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 39

def each_operation(&block)
  @operations.each_value.to_a.flatten.each &block
end

- (Object) find_operation(name, input_name, output_name)



55
56
57
58
59
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 55

def find_operation(name, input_name, output_name)
  get_operations(name).find do |op|
    op.input.name == input_name && op.output.name == output_name
  end
end

- (Object) get_operation(name)



51
52
53
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 51

def get_operation(name)
  @operations[name].first
end

- (Object) get_operations(name)



47
48
49
# File 'lib/wsdl_mapper/svc_desc/wsdl11/port_type.rb', line 47

def get_operations(name)
  @operations[name]
end