Class: Ruboty::DMM::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/ruboty/dmm/agent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAgent

Returns a new instance of Agent.



6
7
8
9
10
11
12
# File 'lib/ruboty/dmm/agent.rb', line 6

def initialize
  @agent = ::Mechanize.new
  @agent.user_agent_alias = 'Mac Safari'
  @agent.ignore_bad_chunking = true
  @agent.request_headers = { 'Accept-Encoding' => '' }
  @agent.ignore_bad_chunking = true
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



4
5
6
# File 'lib/ruboty/dmm/agent.rb', line 4

def agent
  @agent
end