Class: Arpry::ClassFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/arpry/class_factory.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClassFactory

Returns a new instance of ClassFactory.



7
8
# File 'lib/arpry/class_factory.rb', line 7

def initialize
end

Class Method Details

.create(conn_option) ⇒ Object



3
4
5
# File 'lib/arpry/class_factory.rb', line 3

def self.create(conn_option)
  self.new.run(conn_option)
end

Instance Method Details

#run(conn_option) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/arpry/class_factory.rb', line 10

def run(conn_option)
  base = generate_base_class(conn_option)

  namespace = generate_namespace
  classes = generate_classes(base, namespace)
  define_foreign_keys(classes)

  namespace
end