Sha256: 36a4a5d6c47703c5a3027f3cd2bc953d42b226857a4453a3c436961ee2cfdc8b

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

module ScaffoldParser
  module Scaffolders
    class XSD
      class Parser
        module Handlers
          class Extension
            attr_accessor :elements, :attributes

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

            def complex_type(source)
              if source.has_name?
                template = Klass.new(source.name.camelize, elements) do |template|
                  template.inherit_from = attributes['base'].camelize
                end

                STACK.push template
              else
                ComplexType.new elements + [ClassInherit.new(attributes['base'])]
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scaffold_parser-0.6.0 lib/scaffold_parser/scaffolders/xsd/parser/handlers/extension.rb