Class: LolSoap::WSDL::Type
- Inherits:
-
Object
- Object
- LolSoap::WSDL::Type
- Defined in:
- lib/lolsoap/wsdl/type.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
- #element(name) ⇒ Object
- #elements ⇒ Object
-
#initialize(wsdl, name, namespace, elements) ⇒ Type
constructor
A new instance of Type.
- #inspect ⇒ Object
- #prefix ⇒ Object
- #sub_type(name) ⇒ Object
Constructor Details
#initialize(wsdl, name, namespace, elements) ⇒ Type
Returns a new instance of Type.
5 6 7 8 9 10 |
# File 'lib/lolsoap/wsdl/type.rb', line 5 def initialize(wsdl, name, namespace, elements) @wsdl = wsdl @name = name @namespace = namespace @elements = elements end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/lolsoap/wsdl/type.rb', line 3 def name @name end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/lolsoap/wsdl/type.rb', line 3 def namespace @namespace end |
Instance Method Details
#element(name) ⇒ Object
16 17 18 |
# File 'lib/lolsoap/wsdl/type.rb', line 16 def element(name) @elements.fetch(name) { NullElement.new } end |
#elements ⇒ Object
12 13 14 |
# File 'lib/lolsoap/wsdl/type.rb', line 12 def elements @elements.dup end |
#inspect ⇒ Object
28 29 30 31 32 |
# File 'lib/lolsoap/wsdl/type.rb', line 28 def inspect "<#{self.class} " \ "name=#{(prefix + ':' + name).inspect} " \ "elements=#{elements.inspect}>" end |
#prefix ⇒ Object
24 25 26 |
# File 'lib/lolsoap/wsdl/type.rb', line 24 def prefix wsdl.prefixes[namespace] end |
#sub_type(name) ⇒ Object
20 21 22 |
# File 'lib/lolsoap/wsdl/type.rb', line 20 def sub_type(name) element(name).type end |