Method: Indy#before

Defined in:
lib/indy/indy.rb

#before(scope_criteria) ⇒ Object

Scopes the eventual search to all entries prior to this point.

Examples:

For all messages before specified date


Indy.search(LOG_FILE).before(:time => time).all
Indy.search(LOG_FILE).before(:time => time, :span => 10).all

Parameters:

  • scope_criteria (Hash)

    the field to scope for as the key and the value to compare against the other log messages



157
158
159
160
# File 'lib/indy/indy.rb', line 157

def before(scope_criteria)
  params = scope_criteria.merge({:direction => :before})
  within(params)
end