Method: Mechanize::History#push

Defined in:
lib/mechanize/history.rb

#push(page, uri = nil) ⇒ Object Also known as: <<



25
26
27
28
29
30
31
32
33
34
# File 'lib/mechanize/history.rb', line 25

def push(page, uri = nil)
  super page

  index = uri ? uri : page.uri
  @history_index[index.to_s] = page

  shift while length > @max_size if @max_size

  self
end