Class: CucumberTree::Handler::Cookies
- Defined in:
- lib/cucumber_tree/handlers/cookies.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#load(snapshot) ⇒ Object
7 8 9 10 11 |
# File 'lib/cucumber_tree/handlers/cookies.rb', line 7 def load(snapshot) snapshot[:cookies].each do |name, value| page.[name] = value end end |
#save(snapshot) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/cucumber_tree/handlers/cookies.rb', line 13 def save(snapshot) snapshot[:cookies] = {}.tap do |hash| page..each do |name, value| hash[name.to_sym] = value end end end |