Class: Scheman::ParserBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/scheman/parser_builder.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ ParserBuilder

Returns a new instance of ParserBuilder.

Parameters:

  • type (String)


10
11
12
# File 'lib/scheman/parser_builder.rb', line 10

def initialize(type)
  @type = type
end

Class Method Details

.build(type) ⇒ Scheman::Parsers::Base

Parameters:

  • type (String)

    A type of parser (e.g. “mysql”)

Returns:



5
6
7
# File 'lib/scheman/parser_builder.rb', line 5

def self.build(type)
  new(type).build
end

Instance Method Details

#buildObject



14
15
16
# File 'lib/scheman/parser_builder.rb', line 14

def build
  parser_class.new
end