Packt
Advanced Ruby Programming and Object-Oriented Design

Offrez à votre carrière le cadeau de Coursera Plus avec $160 de réduction, facturé annuellement. Économisez aujourd’hui.

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Advanced Ruby Programming and Object-Oriented Design

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Avancées

Expérience recommandée

19 heures pour terminer
3 semaines à 6 heures par semaine
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Avancées

Expérience recommandée

19 heures pour terminer
3 semaines à 6 heures par semaine
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Analyze and evaluate the use of blocks, procs, and lambdas to write flexible and reusable code.

  • Design and create complex class hierarchies and object-oriented structures.

  • Utilize and implement advanced inheritance techniques and the super keyword in Ruby programming.

  • Handle and manage file operations, sets, and date/time manipulations effectively.

Compétences que vous acquerrez

  • Catégorie : Advanced Ruby programming
  • Catégorie : Ruby blocks procs lambdas
  • Catégorie : Ruby advanced techniques
  • Catégorie : Ruby inheritance
  • Catégorie : Ruby modules mixins

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

septembre 2024

Évaluations

6 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

Emplacement réservé

Élaborez votre expertise du sujet

Ce cours fait partie de la Spécialisation Learn to Code with Ruby
Lorsque vous vous inscrivez à ce cours, vous êtes également inscrit(e) à cette Spécialisation.
  • Apprenez de nouveaux concepts auprès d'experts du secteur
  • Acquérez une compréhension de base d'un sujet ou d'un outil
  • Développez des compétences professionnelles avec des projets pratiques
  • Obtenez un certificat professionnel partageable
Emplacement réservé
Emplacement réservé

Obtenez un certificat professionnel

Ajoutez cette qualification à votre profil LinkedIn ou à votre CV

Partagez-le sur les réseaux sociaux et dans votre évaluation de performance

Emplacement réservé

Il y a 15 modules dans ce cours

In this module, we will delve into the advanced functionalities of blocks, Procs, and lambdas in Ruby. You will learn how to implement and utilize these features to create flexible, reusable, and efficient code. We'll cover key concepts such as the 'yield' keyword, block parameters, and methods with Proc parameters, and provide detailed comparisons between Procs and lambdas. By the end of this section, you'll have a comprehensive understanding of these powerful Ruby tools.

Inclus

12 vidéos2 lectures

In this module, we will explore the fundamental principles of object-oriented programming in Ruby by examining classes and objects. You will learn how to define classes, create and use instance variables, and write instance methods to encapsulate functionality. We'll also cover the 'self' keyword, getter and setter methods, and Ruby's shorthand syntax for accessors. By the end of this section, you'll have a solid understanding of how to create and manipulate objects using Ruby classes, setting the foundation for more advanced topics in object-oriented design.

Inclus

14 vidéos

In this module, we will delve deeper into the advanced aspects of Ruby classes. You will learn how to encapsulate class internals with private and protected methods, ensuring controlled access to class functionality. We'll cover how to add validation to setter methods and compute derived values dynamically. Additionally, you'll explore class methods, alternative syntaxes for defining them, and class variables for shared state management. The concept of monkey patching will be introduced, allowing you to extend existing classes with new functionality. This section concludes with a comprehensive review to solidify your understanding of these advanced class concepts.

Inclus

10 vidéos1 devoir

In this module, we will explore the robust feature of keyword arguments in Ruby. You'll learn how to use hashes as initialization arguments to make your methods more flexible and efficient. We'll cover the implementation of required and optional keyword arguments, ensuring your methods can handle varying input needs gracefully. Additionally, we’ll examine the interplay between positional and keyword arguments, providing insights into their effective combination. Through a practical refactoring of the Candidate class, you'll see how keyword arguments can simplify and enhance object initialization. This section concludes with a thorough review to reinforce your understanding of keyword arguments and their benefits.

Inclus

6 vidéos

In this module, we will delve into the powerful concept of inheritance in Ruby. You'll learn to create and manage superclasses and subclasses, understanding the hierarchical relationships that shape object functionality. We'll explore key methods such as 'superclass', 'ancestors', 'is_a?', and 'instance_of?' to trace and verify inheritance hierarchies. You’ll also learn to define exclusive methods in subclasses and override superclass methods. The 'super' keyword will be covered in-depth, along with techniques for defining object equality and leveraging duck typing for dynamic programming. This section concludes with a comprehensive review of all inheritance concepts discussed.

Inclus

13 vidéos

In this module, we will explore various methods for handling input and output operations in Ruby. You'll learn to read from and write to text files, and how to rename and delete files while ensuring their existence. We will also cover how to pass and use command-line arguments via the ARGV array. The module includes a detailed explanation of loading and importing Ruby files using the 'load', 'require', and 'require_relative' methods, highlighting the differences and best practices for each. This section concludes with a comprehensive review to reinforce your understanding of Ruby's file handling and input/output capabilities.

Inclus

7 vidéos1 devoir

In this module, we will explore the powerful concept of modules and mixins in Ruby. You'll learn to define modules with constants and methods, and how to manage multiple modules with identical methods using protected namespaces. We'll cover importing modules into files and utilizing built-in modules like Math, URI, and Net/HTTP. The module will introduce mixins, showcasing how to add methods from modules like Enumerable and Comparable to classes. You'll learn to mix in custom modules, use the 'prepend' and 'extend' keywords, and handle multiple module declarations and nesting within modules. This section concludes with a comprehensive review to solidify your understanding of modules and mixins in Ruby.

Inclus

15 vidéos

In this module, we will delve into the Set data structure in Ruby. You will learn about its properties as a mutable, unordered collection that ensures element uniqueness. We will cover methods to add and delete elements, examining how these methods behave based on the presence or absence of elements within the Set. Additionally, we will explore the Set class's source code on GitHub to gain insights into its implementation. This section concludes with a review to reinforce your understanding of Sets and their practical applications in Ruby programming.

Inclus

4 vidéos

In this module, we will explore the handling of dates and times in Ruby using the Date and Time objects. You will learn to instantiate these objects, perform arithmetic operations to add or subtract time, and compare Time objects using the Comparable module. We'll cover formatting Time objects into strings with the 'strftime' method and parsing strings into Time objects using the 'parse' and 'strptime' methods. This section concludes with a comprehensive review to ensure a solid understanding of managing date and time representations in Ruby for various applications.

Inclus

7 vidéos1 devoir

In this module, we will delve into the powerful tool of regular expressions in Ruby. You'll learn the basics of creating 'Regexp' objects and using simple search methods. We'll explore the 'scan' method to find all matches in a string and practice using symbols like '\d' for digits, '.' for wildcards, and more for custom pattern matching. Anchors and exclusion techniques will be covered to refine your searches. Additionally, we'll learn to use the 'sub' and 'gsub' methods for find-and-replace operations. This section concludes with a review and an introduction to Rubular.com, a helpful resource for experimenting with regular expressions.

Inclus

9 vidéos

In this module, we will explore exception handling in Ruby to manage and respond to errors effectively. You'll learn to use the 'begin' and 'rescue' keywords to define and handle error-prone sections of code. We'll cover capturing error objects with the '=> e' syntax and using multiple rescue clauses for different error types. The 'retry' keyword will be introduced to reattempt code execution, while the 'ensure' keyword will be used for clean-up actions. We'll also discuss how to manually raise exceptions with the 'raise' keyword and define custom error classes for specific error handling. This section concludes with a review to reinforce your understanding of exception handling in Ruby.

Inclus

8 vidéos

In this module, we will immerse ourselves in testing Ruby code using the Minitest framework. Starting with the basics, you'll learn to import the 'minitest/autorun' module, declare test classes, and use common assertions like 'assert_equal'. We'll then test a simple class to put these concepts into practice. You'll learn to set up and tear down test environments using the 'setup' and 'teardown' methods, and validate code behavior with assertions such as 'assert_includes' and 'assert_raises'. Additionally, we will cover how to enhance test messages with custom strings. This section concludes with a comprehensive review of Minitest features and practices to solidify your understanding of testing in Ruby.

Inclus

7 vidéos1 devoir

In this module, we will focus on reading and writing documentation in Ruby. You will learn to navigate the official Ruby documentation, searching for classes and methods while understanding the distinction between class methods ('::') and instance methods ('#'). We'll cover using RDoc to generate webpage documentation for Ruby projects, showing how regular comments can be used to annotate code effectively. By mastering these skills, you'll enhance your ability to document and understand Ruby projects, making your code more maintainable and accessible to others.

Inclus

2 vidéos

In this module, we will explore the world of Ruby Gems, which are pre-written code bundles that can enhance your projects. You'll learn to navigate RubyGems, update the gem program, and install Gems using both 'gem install' and 'bundle install' commands. We'll cover managing project dependencies through a Gemfile to maintain consistency across development environments. Finally, we'll practice using the Faker Gem to generate random data, demonstrating the practical integration of gems into Ruby projects. By the end of this section, you'll be proficient in leveraging gems to add functionality and streamline your Ruby development process.

Inclus

4 vidéos1 devoir

In this final module, we will celebrate the completion of the Advanced Ruby Programming and Object-Oriented Design course. We'll wrap up by summarizing the key learnings and achievements throughout the course. Reflect on the skills acquired, including advanced Ruby techniques, object-oriented design principles, and practical applications. This session provides an opportunity to acknowledge your progress and consider how to apply your new knowledge to future Ruby programming projects.

Inclus

1 vidéo1 lecture1 devoir

Instructeur

Packt - Course Instructors
Packt
375 Cours15 260 apprenants

Offert par

Packt

Recommandé si vous êtes intéressé(e) par Software Development

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.
Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’
Jennifer J.
Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’
Larry W.
Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’
Chaitanya A.
’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’
Emplacement réservé

Ouvrez de nouvelles portes avec Coursera Plus

Accès illimité à plus de 7 000 cours de renommée internationale, à des projets pratiques et à des programmes de certificats reconnus sur le marché du travail, tous inclus dans votre abonnement

Faites progresser votre carrière avec un diplôme en ligne

Obtenez un diplôme auprès d’universités de renommée mondiale - 100 % en ligne

Rejoignez plus de 3 400 entreprises mondiales qui ont choisi Coursera pour les affaires

Améliorez les compétences de vos employés pour exceller dans l’économie numérique

Foire Aux Questions