Ruby Methods


Not CompletedHow to Create Methods in Ruby

Methods are a powerful feature for building Ruby programs, they allow you to encapsulate behavior and call the method to implement functionality into an application. This is an important lesson, as we are going to learn about methods.

Not CompletedWhat Does a Ruby Method Return?

Learning what a method returns is critical in any programming language, Ruby specifically has a unique way with working with returned values. In this lesson, we are going to learn what a method returns.

Not CompletedWhat are the Differences Between Class and Instance Methods in Ruby?

Though we haven't gone deep into classes in Ruby, I thought it would be good to show you the differences between class and instance methods in Ruby, since it's important to see the different behavior.

Not CompletedRuby Proc Tutorial

In this lesson, we are going to talk about a cool module in Ruby called a Proc. At the highest level, procs are methods that can be stored inside variables.

Not CompletedRuby Lambda Tutorial

Similar to Procs, Lambdas allow you to store functions inside a variable and call the method from other methods. In this lesson, we are going to go over Lambdas and how to integrate them into a Ruby program.

Not CompletedWhat is the Difference Between Procs and Lambdas in Ruby?

Now that we've seen procs and lambdas, we are going to see their differences in this lesson. There are two key differences, other than the syntax. But, they are so tiny that you may never even notice them while programming. Still, it's good to know.

Not CompletedGuide to Method Arguments in Ruby

This guide examines the various ways to pass arguments to methods in Ruby programs, including: the argument syntax, named arguments, and default arguments.

Not CompletedHow to Use Splat and Optional Arguments in Ruby Methods

This guide explains how to use the splat and optional argument types with Ruby methods to give flexible interfaces to programs

Quizzes


Ruby Methods
    Unsupported Browser

    devCamp does not support ancient browsers.
    Install a modern version for best experience.