add comment
parent
5eeee146dc
commit
88219df484
|
@ -121,11 +121,17 @@ class Mechanize
|
||||||
@agent.user_agent = user_agent
|
@agent.user_agent = user_agent
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_page
|
# get the page mechanize last visited.
|
||||||
|
#
|
||||||
|
# ```
|
||||||
|
# agent.current_page
|
||||||
|
# ```
|
||||||
|
def current_page : MechanizeCr::Page
|
||||||
@agent.current_page
|
@agent.current_page
|
||||||
end
|
end
|
||||||
|
|
||||||
def back
|
# get the latest page recorded in history, and the page is deleted from history.
|
||||||
|
def back : MechanizeCr::Page
|
||||||
@agent.history.pop
|
@agent.history.pop
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue