Ruby Methods

One of the most powerful tools available to developers is the ability to store functionality and share that behavior throughout a program. In this chapter, you'll learn how to create and use methods in Ruby programs to store processes and reuse them throughout a program, including an overview of procs and lambdas. Additionally, we'll walk through how you can do the following:

  • Demonstrate how to build methods in Ruby to encapsulate various processes
  • Develop proc- and lambda-based programs and show when to use closures instead of traditional methods
  • Recommend how to work with the full list of method argument options, including traditional, splat, named, and default arguments
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.149.119