[Ruby] ruby method definition

less than 1 minute read

For output. I will output the method definition of ruby easily.

Simple to use def method name ‘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’s a skipped process, so I want to be careful only there

I’m having a hard time with rails, so this is the basic I want to keep.

Tags:

Updated: