Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Ruby Essential Training Part 2: Classes and Modules

via LinkedIn Learning

Overview

Prepare for a new career with $100 off Coursera Plus
Gear up for jobs in high-demand fields: data analytics, digital marketing, and more.
Learn how to define custom classes and modules in Ruby for more efficient, maintainable, and scalable code.

Syllabus

Introduction
  • Learn to use custom classes in Ruby
  • What you need to know
  • Get the most out of the exercise files
1. Classes
  • Define a class
  • Instances
  • Attributes
  • Reader and writer methods
  • Attribute methods
  • Method access control
  • Initialize method
  • Challenge: Dice
  • Solution: Dice
2. Class Attributes and Methods
  • Class methods
  • Class attributes
  • Class reader and writer methods
  • Challenge: Radio
  • Solution: Radio
3. Inheritance
  • Class inheritance
  • Override and extend
  • Access the superclass
  • Challenge: Secure radio
  • Solution: Secure radio
4. Dates and Times
  • Time
  • Date
  • DateTime
  • Challenge: Birthdate analysis
  • Solution: Birthdate analysis
5. Modules
  • Namespacing
  • Mixins
  • Load, require, and include
  • Challenge: To-do list
  • Solution: To-do list
6. Exceptions
  • Handle exceptions
  • Handle specific exceptions
  • Exception methods
  • Raise exceptions
  • Custom exceptions
  • Challenge: Custom exceptions
Conclusion
  • Next steps

Taught by

Kevin Skoglund

Reviews

Start your review of Ruby Essential Training Part 2: Classes and Modules

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.