class Scruber::Helpers::UserAgentRotator::Configuration

Attributes

tags[R]
user_agents[R]

Public Class Methods

new() click to toggle source
# File lib/scruber/helpers/user_agent_rotator.rb, line 28
def initialize
  @tags = :all
  @user_agents = []
end

Public Instance Methods

add(name, options={}) click to toggle source
# File lib/scruber/helpers/user_agent_rotator.rb, line 41
def add(name, options={})
  ua = UserAgent.new(name, options)
  @user_agents.push ua
end
clean() click to toggle source
# File lib/scruber/helpers/user_agent_rotator.rb, line 37
def clean
  @user_agents = []
end
configure(&block) click to toggle source
# File lib/scruber/helpers/user_agent_rotator.rb, line 33
def configure(&block)
  instance_eval &block
end
set_filter(tags) click to toggle source
# File lib/scruber/helpers/user_agent_rotator.rb, line 46
def set_filter(tags)
  @tags = tags
end