add comment

master
Kanezoh 2021-10-13 21:56:00 +09:00
parent 5eeee146dc
commit 88219df484
1 changed files with 11 additions and 5 deletions

View File

@ -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