#ruby #rubyonrails #RubyonRailsHindi
Intro to Methods in Ruby for Beginners | Ruby on Rails Tutorial | 2022
Here in this tutorial, you are going to know about:-
what are the methods in Ruby?
how is it different from other programming languages?;
why use methods and Ruby?
were to use methods and Ruby?
A method in Ruby is a set of expressions that returns a value. With methods, one can organize their code into subroutines that can be easily invoked from other areas of their program. Other languages sometimes refer to this as a function. A method may be defined as a part of a class or separately.
variable Number of Parameters: Ruby allows the programmer to define a method that can take the variable number of arguments. It is useful when the user doesn't know the number of parameters to be passed while illustrating the method.
if you find difficulty in understanding any concept please let me know in the comment section and I will answer those as soon as possible
Also please don't forget to subscribe to my channel and like the video and share it with your friends.