Method: NoBrainer::QueryRunner.run

Defined in:
lib/no_brainer/query_runner.rb

.run(*args, &block) ⇒ Object

Raises:

  • (ArgumentError)


17
18
19
20
21
22
# File 'lib/no_brainer/query_runner.rb', line 17

def run(*args, &block)
  options = args.extract_options!
  raise ArgumentError unless args.size == 1 || block
  query = args.first || block.call(RethinkDB::RQL.new)
  stack.call(:query => query, :options => options)
end