Created
October 10, 2014 14:50
-
-
Save igaiga/8cf0ace278a490af4f78 to your computer and use it in GitHub Desktop.
This file contains 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
key = gets.chomp | |
@dbh.execute("delete from bookinfos where key = #{key}") | |
解説 | |
" " でくくった文字列の中で #{変数名}と書くと、変数に代入されている値を文字列にすることができます。 | |
たとえば | |
foo = "xyz" | |
"abc #{foo}" | |
は | |
"abc xyz" と同じです。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment