Method: WWW::Mechanize#transact
- Defined in:
- lib/www/mechanize.rb
#transact ⇒ Object
Runs given block, then resets the page history as it was before. self is given as a parameter to the block. Returns the value of the block.
369 370 371 372 373 374 375 376 |
# File 'lib/www/mechanize.rb', line 369 def transact history_backup = @history.dup begin yield self ensure @history = history_backup end end |