Class: WSDL::Request::Envelope
- Inherits:
-
Object
- Object
- WSDL::Request::Envelope
- Defined in:
- lib/wsdl/request/envelope.rb
Overview
Root node of the request envelope.
Instance Attribute Summary collapse
- #annotations ⇒ Array<Hash{Symbol => Object}> readonly
- #body ⇒ Array<Node> readonly
- #header ⇒ Array<Node> readonly
- #namespace_decls ⇒ Array<NamespaceDecl> readonly
Instance Method Summary collapse
-
#initialize ⇒ Envelope
constructor
A new instance of Envelope.
-
#namespace_uri_for(prefix) ⇒ String?
Returns namespace URI for a given prefix.
-
#namespaces_hash ⇒ Hash{String => String}
Returns a Hash representation of namespace declarations.
Constructor Details
#initialize ⇒ Envelope
Returns a new instance of Envelope.
7 8 9 10 11 12 |
# File 'lib/wsdl/request/envelope.rb', line 7 def initialize @header = [] @body = [] @namespace_decls = [] @annotations = [] end |
Instance Attribute Details
#annotations ⇒ Array<Hash{Symbol => Object}> (readonly)
24 25 26 |
# File 'lib/wsdl/request/envelope.rb', line 24 def annotations @annotations end |
#body ⇒ Array<Node> (readonly)
18 19 20 |
# File 'lib/wsdl/request/envelope.rb', line 18 def body @body end |
#header ⇒ Array<Node> (readonly)
15 16 17 |
# File 'lib/wsdl/request/envelope.rb', line 15 def header @header end |
#namespace_decls ⇒ Array<NamespaceDecl> (readonly)
21 22 23 |
# File 'lib/wsdl/request/envelope.rb', line 21 def namespace_decls @namespace_decls end |
Instance Method Details
#namespace_uri_for(prefix) ⇒ String?
Returns namespace URI for a given prefix.
30 31 32 33 |
# File 'lib/wsdl/request/envelope.rb', line 30 def namespace_uri_for(prefix) decl = @namespace_decls.find { |d| d.prefix == prefix } decl&.uri end |
#namespaces_hash ⇒ Hash{String => String}
Returns a Hash representation of namespace declarations.
38 39 40 |
# File 'lib/wsdl/request/envelope.rb', line 38 def namespaces_hash @namespace_decls.to_h { |decl| [decl.prefix || '', decl.uri] } end |