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.
Instance Method Summary collapse
-
#initialize(element) ⇒ Binding
constructor
A new instance of Binding.
- #operation?(name) ⇒ Boolean
Constructor Details
#initialize(element) ⇒ Binding
Returns a new instance of Binding.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/wsdl-reader/binding.rb', line 38 def initialize(element) @operations = Hash.new @name = element.attributes['name'] @type = element.attributes['type'] # because of Object#type @style = nil @transport = nil # Process all binding and operation element.find_all { |e| e.class == REXML::Element }.each { |operation| case operation.name when "binding" # soap:binding store_style_and_transport(element, operation) when "operation" store_operation_name(element, operation) operation.find_all { |e| e.class == REXML::Element }.each { |action| store_action(action, element, operation) } else warn "Ignoring element `#{operation.name}' in binding `#{element.attributes['name']}'" end } end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/wsdl-reader/binding.rb', line 33 def name @name end |
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
32 33 34 |
# File 'lib/wsdl-reader/binding.rb', line 32 def operations @operations end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
35 36 37 |
# File 'lib/wsdl-reader/binding.rb', line 35 def style @style end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
36 37 38 |
# File 'lib/wsdl-reader/binding.rb', line 36 def transport @transport end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
34 35 36 |
# File 'lib/wsdl-reader/binding.rb', line 34 def type @type end |
Instance Method Details
#operation?(name) ⇒ Boolean
63 64 65 |
# File 'lib/wsdl-reader/binding.rb', line 63 def operation?(name) operations.include? name end |