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.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/wsdl-reader/binding.rb', line 34 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.
29 30 31 |
# File 'lib/wsdl-reader/binding.rb', line 29 def name @name end |
#operations ⇒ Object (readonly)
Returns the value of attribute operations.
28 29 30 |
# File 'lib/wsdl-reader/binding.rb', line 28 def operations @operations end |
#style ⇒ Object (readonly)
Returns the value of attribute style.
31 32 33 |
# File 'lib/wsdl-reader/binding.rb', line 31 def style @style end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport.
32 33 34 |
# File 'lib/wsdl-reader/binding.rb', line 32 def transport @transport end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
30 31 32 |
# File 'lib/wsdl-reader/binding.rb', line 30 def type @type end |
Instance Method Details
#operation?(name) ⇒ Boolean
59 60 61 |
# File 'lib/wsdl-reader/binding.rb', line 59 def operation?(name) operations.include? name end |