Class: Baza::Driver::ActiveRecord::Tables
- Inherits:
-
Object
- Object
- Baza::Driver::ActiveRecord::Tables
- Defined in:
- lib/baza/driver/active_record/tables.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Tables
constructor
A new instance of Tables.
- #method_missing ⇒ Object
Constructor Details
#initialize(args) ⇒ Tables
Returns a new instance of Tables.
2 3 4 5 6 7 |
# File 'lib/baza/driver/active_record/tables.rb', line 2 def initialize(args) @args = args require "#{File.dirname(__FILE__)}/../#{@args.fetch(:db).driver.driver_type}" @proxy_to = ::Baza::Driver.const_get(StringCases.snake_to_camel(@args.fetch(:db).driver.driver_type)).const_get(:Tables).new(**@args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing ⇒ Object
9 10 11 |
# File 'lib/baza/driver/active_record/tables.rb', line 9 def method_missing(...) @proxy_to.__send__(...) end |