include?
次のコンテキストで、メソッドの背後にあるロジックを誰かが説明できますか?
some_var = gets.chomp.to_i
until (1..12).include? some_var
print "Please, re-type it again!"
number = gets.chomp.to_i
end
include?
次のコンテキストで、メソッドの背後にあるロジックを誰かが説明できますか?
some_var = gets.chomp.to_i
until (1..12).include? some_var
print "Please, re-type it again!"
number = gets.chomp.to_i
end
疑問がある場合は、ドキュメントにアクセスしてください: http://ruby-doc.org/core-2.0/Range.html#method-i-include-3F