Class: WSDL::XMLSchema::Content
- Defined in:
- lib/wsdl/xmlSchema/content.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
-
#elements ⇒ Object
readonly
Returns the value of attribute elements.
-
#final ⇒ Object
Returns the value of attribute final.
-
#mixed ⇒ Object
Returns the value of attribute mixed.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Info
Instance Method Summary collapse
- #<<(content) ⇒ Object
- #each ⇒ Object
-
#initialize ⇒ Content
constructor
A new instance of Content.
- #parse_attr(attr, value) ⇒ Object
- #parse_element(element) ⇒ Object
- #parse_epilogue ⇒ Object
- #targetnamespace ⇒ Object
Methods inherited from Info
Constructor Details
#initialize ⇒ Content
Returns a new instance of Content.
23 24 25 26 27 28 29 30 |
# File 'lib/wsdl/xmlSchema/content.rb', line 23 def initialize super() @final = nil @mixed = false @type = nil @contents = [] @elements = [] end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents
20 21 22 |
# File 'lib/wsdl/xmlSchema/content.rb', line 20 def contents @contents end |
#elements ⇒ Object (readonly)
Returns the value of attribute elements
21 22 23 |
# File 'lib/wsdl/xmlSchema/content.rb', line 21 def elements @elements end |
#final ⇒ Object
Returns the value of attribute final
17 18 19 |
# File 'lib/wsdl/xmlSchema/content.rb', line 17 def final @final end |
#mixed ⇒ Object
Returns the value of attribute mixed
18 19 20 |
# File 'lib/wsdl/xmlSchema/content.rb', line 18 def mixed @mixed end |
#type ⇒ Object
Returns the value of attribute type
19 20 21 |
# File 'lib/wsdl/xmlSchema/content.rb', line 19 def type @type end |
Instance Method Details
#<<(content) ⇒ Object
36 37 38 39 |
# File 'lib/wsdl/xmlSchema/content.rb', line 36 def <<(content) @contents << content update_elements end |
#each ⇒ Object
41 42 43 44 45 |
# File 'lib/wsdl/xmlSchema/content.rb', line 41 def each @contents.each do |content| yield content end end |
#parse_attr(attr, value) ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/wsdl/xmlSchema/content.rb', line 67 def parse_attr(attr, value) case attr when FinalAttrName @final = value.source when MixedAttrName @mixed = (value.source == 'true') else nil end end |
#parse_element(element) ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/wsdl/xmlSchema/content.rb', line 47 def parse_element(element) case element when AllName, SequenceName, ChoiceName o = Content.new o.type = element.name @contents << o o when AnyName o = Any.new @contents << o o when ElementName o = Element.new @contents << o o else nil end end |
#parse_epilogue ⇒ Object
78 79 80 |
# File 'lib/wsdl/xmlSchema/content.rb', line 78 def parse_epilogue update_elements end |
#targetnamespace ⇒ Object
32 33 34 |
# File 'lib/wsdl/xmlSchema/content.rb', line 32 def targetnamespace parent.targetnamespace end |