Class: Baza::Driver::ActiveRecord::Users
- Inherits:
-
Object
- Object
- Baza::Driver::ActiveRecord::Users
- Defined in:
- lib/baza/driver/active_record/users.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Users
constructor
A new instance of Users.
- #method_missing(name, *args, &blk) ⇒ Object
Constructor Details
#initialize(args) ⇒ Users
Returns a new instance of Users.
2 3 4 5 6 7 |
# File 'lib/baza/driver/active_record/users.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(:Users).new(@args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &blk) ⇒ Object
9 10 11 |
# File 'lib/baza/driver/active_record/users.rb', line 9 def method_missing(name, *args, &blk) @proxy_to.__send__(name, *args, &blk) end |