Module: Browser::Bots

Included in:
Browser
Defined in:
lib/browser/methods/bots.rb

Constant Summary collapse

BOTS =
YAML.load_file(File.expand_path("../../../../bots.yml", __FILE__))

Instance Method Summary collapse

Instance Method Details

#bot?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/browser/methods/bots.rb', line 5

def bot?
  ua.empty? || BOTS.any? {|key, description| ua.include?(key) }
end