Created
November 4, 2013 09:32
-
-
Save kyuden/7300213 to your computer and use it in GitHub Desktop.
【WZ】<保持しないKeyで参照を行った場合のエラー処理付きhash>
・予期しない入力が起こった場合のエラー文言をカスタマイズしたい場合
・CLIアプリなどで多様
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hash = Hash.new do |hash, k| | |
raise( ArgumentError, "'#{k}' is not todo sub command" ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment