Class: Baza::Driver::ActiveRecord::Databases
- Inherits:
-
Object
- Object
- Baza::Driver::ActiveRecord::Databases
- Defined in:
- lib/baza/driver/active_record/databases.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Databases
constructor
A new instance of Databases.
- #method_missing(name, *args, &blk) ⇒ Object
Constructor Details
#initialize(args) ⇒ Databases
Returns a new instance of Databases.
2 3 4 5 |
# File 'lib/baza/driver/active_record/databases.rb', line 2 def initialize(args) @args = args @proxy_to = ::Baza::Driver.const_get(StringCases.snake_to_camel(@args[:db].driver.driver_type)).const_get(:Databases).new(@args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
7 8 9 |
# File 'lib/baza/driver/active_record/databases.rb', line 7 def method_missing(name, *args, &blk) @proxy_to.__send__(name, *args, &blk) end |