Class: Arpry::ClassFactory
- Inherits:
-
Object
- Object
- Arpry::ClassFactory
- Defined in:
- lib/arpry/class_factory.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ClassFactory
constructor
A new instance of ClassFactory.
- #run(conn_option) ⇒ Object
Constructor Details
#initialize ⇒ ClassFactory
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 |