For output. I will easily output the method definition of ruby.
Simple def method name for usage end
For example, the following unused patterns
puts "1"
puts "2"
puts "3"
puts "4"
puts "5"
puts "6"
puts "7"
puts "8"
puts "9"
puts "10"
puts "1"
puts "2"
puts "3"
puts "4"
puts "5"
puts "6"
puts "7"
puts "8"
puts "9"
puts "10"
puts "1"
puts "2"
puts "3"
puts "4"
puts "5"
puts "6"
puts "7"
puts "8"
puts "9"
puts "10"
Pattern used
def number_count
puts "1"
puts "2"
puts "3"
puts "4"
puts "5"
puts "6"
puts "7"
puts "8"
puts "9"
puts "10"
end
number_count
number_count
number_count
The output result is the same.
Basically def end is until the method is loaded It will be skipped, so be careful about that
I'm having trouble with rails, so it's a basic thing I want to keep down.
Recommended Posts