Sha256: 6c92f1d5c5843217cbb21396c8cad7c64d7eb876692022212c6b3e5bdf27fbd7

Contents?: true

Size: 860 Bytes

Versions: 1

Compression:

Stored size: 860 Bytes

Contents

module ScaffoldParser
  module Scaffolders
    class XSD
      class Parser
        module Handlers
          class ModuleInclude
            attr_reader :ref

            def initialize(ref)
              @ref = ref&.camelize
            end

            def sequence(_)
              Sequence.new self
            end

            def complex_type(new_source)
              if new_source.has_name?
                STACK.push Klass.new(new_source.name.camelize, self)
              else
                self
              end
            end

            def element(new_source)
              if new_source.has_name?
                new_class = STACK.push Klass.new(new_source.name.camelize, self)

                SubmodelMethod.new(new_source, new_class.name.camelize)
              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/module_include.rb