definition of ruby method

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

definition of ruby method
[Ruby] Method definition summary
Ruby to_s method
[Ruby] slice method
[Ruby] end_with? method
[Ruby] Method memorandum
Basics of Ruby
[Ruby] initialize method
Ruby build method
Ruby accessor method
ruby map method
Ruby Learning # 30 Initialize Method
abbreviation for ruby method
Ruby Learning # 24 Exponent Method
Ruby Thread # [] = method notes
Definition of Android constants
Basic methods of Ruby hashes
Basic methods of Ruby arrays
[Ruby] Various types of each
Integer check method with ruby
Basic knowledge in method definition
Main functions of scope method
[Ruby] List of basic commands
[Ruby] Notes on gets method
Judgment of fractions in Ruby
Practice of linear search method
[Ruby] Method that returns truth
Benefits of Java static method
[ruby] Method call with argument
Review of Ruby basic grammar
[Ruby] Questions and verification about the number of method arguments
About the behavior of ruby Hash # ==
Ruby design pattern template method pattern memo
Method
[Ruby] Method to count specific characters
Basics of sending Gmail in Ruby
[Ruby] present/blank method and postfix if.
Extraction of "ruby" double hash * Review
[Ruby] See the essence of ArgumentError
Basic knowledge of Ruby on Rails
Consideration of Routing of form_with helper method
[Ruby] Extracting elements with slice method
[Ruby basics] split method and to_s method
[Ruby] How to use any? Method
String output method memo in Ruby
Ruby 5 or higher sum of integers
About the role of the initialize method
Basics of Ruby ~ Review of confusing parts ~
Ruby / Rust linkage (6) Extraction of morphemes
[Swift] Protocol concept and definition method
Impressions of making BlackJack-cli with Ruby
Ruby memorandum (acquisition of key value)
[Ruby] Review about nesting of each
[Ruby] Search problem using index method
[Ruby on Rails] Convenient helper method
What kind of method is define_method?
Explanation about Array object of Ruby
[Ruby] undefined method `dark?'occurs in rqr_code
How to use Ruby inject method
Ruby Basics 2 ~ Review of confusing parts ~
[Ruby] Display the contents of variables