Class: Rethinker::QueryRunner::Driver
- Inherits:
-
Middleware
- Object
- Middleware
- Rethinker::QueryRunner::Driver
- Defined in:
- lib/rethinker/query_runner/driver.rb
Instance Method Summary collapse
Methods inherited from Middleware
Constructor Details
This class inherits a constructor from Rethinker::QueryRunner::Middleware
Instance Method Details
#call(env) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'lib/rethinker/query_runner/driver.rb', line 2 def call(env) # TODO have a logger puts env[:query].inspect if ENV['DEBUG'] env[:query].run(Rethinker.connection, env[:options]) rescue NoMethodError => e raise "Rethinker is not connected to a RethinkDB instance" unless Rethinker.connection raise e end |