Class: ScaffoldParser::Scaffolders::XSD::Parser::Handlers::Choice
- Inherits:
-
Object
- Object
- ScaffoldParser::Scaffolders::XSD::Parser::Handlers::Choice
- Includes:
- OrderElements
- Defined in:
- lib/scaffold_parser/scaffolders/xsd/parser/handlers/choice.rb
Instance Attribute Summary collapse
-
#elements ⇒ Object
Returns the value of attribute elements.
Instance Method Summary collapse
- #complex_type(source) ⇒ Object
- #extension(source) ⇒ Object
-
#initialize(elements = []) ⇒ Choice
constructor
A new instance of Choice.
Methods included from OrderElements
Constructor Details
#initialize(elements = []) ⇒ Choice
Returns a new instance of Choice.
11 12 13 |
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/choice.rb', line 11 def initialize(elements = []) @elements = [*elements] end |
Instance Attribute Details
#elements ⇒ Object
Returns the value of attribute elements.
9 10 11 |
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/choice.rb', line 9 def elements @elements end |
Instance Method Details
#complex_type(source) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/choice.rb', line 15 def complex_type(source) if source.has_name? STACK.push Klass.new(source, elements) else ComplexType.new(elements) end end |