Class: ScaffoldParser::Scaffolders::XSD::Parser::Handlers::All

Inherits:
Object
  • Object
show all
Defined in:
lib/scaffold_parser/scaffolders/xsd/parser/handlers/all.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(elements = []) ⇒ All

Returns a new instance of All.



9
10
11
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/all.rb', line 9

def initialize(elements = [])
  @elements = [*elements]
end

Instance Attribute Details

#elementsObject

Returns the value of attribute elements.



7
8
9
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/all.rb', line 7

def elements
  @elements
end

Instance Method Details

#complex_type(source) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/all.rb', line 17

def complex_type(source)
  if source.has_name?
    STACK.push Klass.new(source, elements)
  end

  ComplexType.new elements
end

#group(source) ⇒ Object



13
14
15
# File 'lib/scaffold_parser/scaffolders/xsd/parser/handlers/all.rb', line 13

def group(source)
  STACK.push Module.new(source, elements)
end