Module: Vorpal::Dsl::Configuration
- Included in:
- Vorpal
- Defined in:
- lib/vorpal/dsl/configuration.rb
Instance Method Summary collapse
-
#define(options = {}, &block) ⇒ Engine
Configures and creates a Engine instance.
-
#map(domain_class, options = {}, &block) ⇒ Object
Maps a domain class to a relational table.
Instance Method Details
#define(options = {}, &block) ⇒ Engine
Configures and creates a Engine instance.
16 17 18 19 20 |
# File 'lib/vorpal/dsl/configuration.rb', line 16 def define(={}, &block) master_config = build_config(&block) db_driver = .fetch(:db_driver, Driver::Postgresql.new) Engine.new(db_driver, master_config) end |
#map(domain_class, options = {}, &block) ⇒ Object
Maps a domain class to a relational table.
38 39 40 |
# File 'lib/vorpal/dsl/configuration.rb', line 38 def map(domain_class, ={}, &block) @class_configs << build_class_config(domain_class, , &block) end |