Add a confirm method

Note that I'm not a ruby developer :-)

Fix #1111