Array
This class manages history for your mechanize object.
# File lib/mechanize/history.rb, line 37 def clear @history_index.clear super end
# File lib/mechanize/history.rb, line 12 def initialize_copy(orig) super @history_index = orig.instance_variable_get(:@history_index).dup end
# File lib/mechanize/history.rb, line 51 def pop return nil if length == 0 page = super remove_from_index(page) page end
# File lib/mechanize/history.rb, line 17 def push(page, uri = nil) super(page) @history_index[(uri ? uri : page.uri).to_s] = page if @max_size && self.length > @max_size while self.length > @max_size self.shift end end self end
# File lib/mechanize/history.rb, line 42 def shift return nil if length == 0 page = self[0] self[0] = nil super remove_from_index(page) page end
Generated with the Darkfish Rdoc Generator 2.