Class: WSDL::Reader::PortType
- Inherits:
-
Object
- Object
- WSDL::Reader::PortType
- Defined in:
- lib/wsdl-reader/port_type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
Instance Method Summary collapse
-
#initialize(element) ⇒ PortType
constructor
A new instance of PortType.
- #lookup_operation_message(type, operation, messages) ⇒ Object
- #lookup_operations_by_message(type, message) ⇒ Object
- #operation_message?(type, operation, message) ⇒ Boolean
Constructor Details
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/wsdl-reader/port_type.rb', line 20 def name @name end |
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
19 20 21 |
# File 'lib/wsdl-reader/port_type.rb', line 19 def operations @operations end |
Instance Method Details
#lookup_operation_message(type, operation, messages) ⇒ Object
29 30 31 32 |
# File 'lib/wsdl-reader/port_type.rb', line 29 def (type, operation, ) operation_name = operation.is_a?(Operation) ? operation.name : operation.to_s [@operations[operation_name][type][:message].split(':').last] end |
#lookup_operations_by_message(type, message) ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/wsdl-reader/port_type.rb', line 34 def (type, ) ops = @operations.values.select do |operation| type, operation, end ops.map do |operation_hash| operation_hash[:name] end end |
#operation_message?(type, operation, message) ⇒ Boolean
43 44 45 46 47 |
# File 'lib/wsdl-reader/port_type.rb', line 43 def (type, operation, ) = .is_a?(Message) ? .name : .to_s operation[type][:message] == || operation[type][:message].split(':').last == end |