Method: Spider::Model::Query#where

Defined in:
lib/spiderfw/model/query.rb

#where(condition = nil, &proc) ⇒ Object

Takes an argument or a block. If given an argument, will use it as a Condition. If given a block, will use it on the Condition.

Parameters:

  • condition (Condition) (defaults to: nil)
  • proc (Proc)

    Block used to construct the Condition



132
133
134
135
136
# File 'lib/spiderfw/model/query.rb', line 132

def where(condition=nil, &proc)
    condition = Condition.new(&proc) unless (condition)
    @condition << condition
    return self
end