Skip to content

Instantly share code, notes, and snippets.

@no6v
Created May 23, 2012 03:50
Show Gist options
  • Save no6v/2773173 to your computer and use it in GitHub Desktop.
Save no6v/2773173 to your computer and use it in GitHub Desktop.
# encoding: UTF-8
module Earthquake
module Input
def ask_with_accept_ctrl_yn(message)
s = ask_without_accept_ctrl_yn(message)
{"\cY" => "Y", "\cN" => "N", "ん" => "N"}.fetch(s, s)
end
alias_method_chain :ask, :accept_ctrl_yn
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment