Class: Auchandirect::ScrAPI::Agent

Inherits:
Object
  • Object
show all
Defined in:
lib/auchandirect/scrAPI/agent.rb

Overview

Helper class for common code around mechanize agents

Class Method Summary collapse

Class Method Details

.configure(agent) ⇒ Object

Initializes agent with the auchandirect cookie for both items and cart apis.



30
31
32
33
34
35
# File 'lib/auchandirect/scrAPI/agent.rb', line 30

def self.configure(agent)
  agent.cookie_jar << Mechanize::Cookie.new(domain: '.auchandirect.fr',
                                            name: 'prehomemobile',
                                            value: 'prehomemobile',
                                            path: '/')
end