Class: WSDL::Reader::Binding
- Inherits:
-
Object
- Object
- WSDL::Reader::Binding
- Defined in:
- lib/wsdl-reader/binding.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#operations ⇒ Object
readonly
Returns the value of attribute operations.
-
#style ⇒ Object
readonly
Returns the value of attribute style.
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type_nns ⇒ Object
readonly
Returns the value of attribute type_nns.
Instance Method Summary collapse
-
#initialize(element) ⇒ Binding
constructor
A new instance of Binding.
- #lookup_port_type(port_types) ⇒ Object
- #operation?(name) ⇒ Boolean
Constructor Details
#initialize(element) ⇒ Binding
Returns a new instance of Binding.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/wsdl-reader/binding.rb', line 46 def initialize(element) @operations = Operations.new @name = element.attributes['name'] @type = element.attributes['type'] # because of Object#type @type_nns = @type.split(':').last rescue @type @style = nil @transport = nil # Process all binding and operation element.find_all { |e| e.class == REXML::Element }.each do |operation_element| case operation_element.name when "binding" # soap:binding store_style_and_transport(operation_element) when "operation" append_operation(operation_element) else warn "Ignoring element `#{operation.name}' in binding `#{element.attributes['name']}'" end end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
40 41 42 |
# File 'lib/wsdl-reader/binding.rb', line 40 def name @name end |
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
39 40 41 |
# File 'lib/wsdl-reader/binding.rb', line 39 def operations @operations end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
43 44 45 |
# File 'lib/wsdl-reader/binding.rb', line 43 def style @style end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
44 45 46 |
# File 'lib/wsdl-reader/binding.rb', line 44 def transport @transport end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
41 42 43 |
# File 'lib/wsdl-reader/binding.rb', line 41 def type @type end |
#type_nns ⇒ Object (readonly)
Returns the value of attribute type_nns.
42 43 44 |
# File 'lib/wsdl-reader/binding.rb', line 42 def type_nns @type_nns end |
Instance Method Details
#lookup_port_type(port_types) ⇒ Object
72 73 74 |
# File 'lib/wsdl-reader/binding.rb', line 72 def lookup_port_type(port_types) port_types[type.split(':').last] end |
#operation?(name) ⇒ Boolean
68 69 70 |
# File 'lib/wsdl-reader/binding.rb', line 68 def operation?(name) operations.include? camelize_operation(name) end |