filmov
tv
The Singleton Pattern in Ruby

Показать описание
The Singleton Pattern helps with restricting the number of instances a class can create to just one and gives you a global way of accessing the instance.
This can be useful when you need to manage access to some resource, like a configuration object, or a logger.
0:00 - Introduction
1:29 - How does it work
1:49 - A regular object
2:20 - Implementing the pattern using a custom class
3:12 - Ruby's "Singleton" module
4:01 - Similarities with classes
4:25 - Similarities with modules
4:30 - Similarities with constants
If you want to learn more about design patterns, check out these two books.
#webdev #ruby #designpatterns #singletonpattern
This can be useful when you need to manage access to some resource, like a configuration object, or a logger.
0:00 - Introduction
1:29 - How does it work
1:49 - A regular object
2:20 - Implementing the pattern using a custom class
3:12 - Ruby's "Singleton" module
4:01 - Similarities with classes
4:25 - Similarities with modules
4:30 - Similarities with constants
If you want to learn more about design patterns, check out these two books.
#webdev #ruby #designpatterns #singletonpattern
The Singleton Pattern in Ruby
Ruby Tutorial For Beginners: Singleton Methods
Ruby Singleton Design Pattern
RubyConf 2019 - The Singleton Module and Its Pattern In Ruby by Mike Calhoun
Singleton Design Pattern In Ruby
Ruby Method Lookup (Singleton Class)
Ruby Singleton Class
2011.08.23 [EST] Anton Narusberg - Ruby Singleton Class
Секреты классов Ruby | Singleton class
Singleton method in Ruby
Popular Ruby Design Patterns to use in 2023
Ruby Singleton Class
Ruby What is the main purpose of singleton class in Ruby
The Factory Method Pattern in Ruby
The Singleton Pattern
Eigenclasses | Preview
Strategy Design Pattern (With Ruby Example)
Gang of Design Patterns in Ruby: Introduction
Factory Method Design Pattern In Ruby
5 Design Patterns That Are ACTUALLY Used By Developers
AM Coder - Ruby OOP Masterclass II - (Inheritance, Factories, Singletons, Composition)
Ruby on Rails para iniciantes - Aula 34 - Singleton Pattern vs Singleton Class
Gang of Design Patterns in Ruby: Getting Started
Паттерн Одиночка (Singleton) с реализацией на Ruby
Комментарии