~/talk

The Singleton Module and Its Pattern In Ruby

Talkat RubyConf 2019 · 2019-11-18..11-20· [ruby]
slides:none on file

Shows that Ruby’s stdlib Singleton module makes new and allocate private and supplies an instance method while forbidding clone/dup, demonstrates using Singletons for logging and config where data flows one way, builds examples: class-level Singleton methods for cats, per-object Singleton class to add PK’s snore, and a Schrödinger’s cat private-status fix by manipulating the Singleton class on an object. Argues the implementation ties to Ruby’s message dispatch and is pragmatically useful.

AI-written summary · about

  1. 0:00Start
  2. 3:37What is The Singleton Pattern?
  3. 6:55Concerns
  4. 9:10Common Appropriate Use Cases
  5. 17:40Singleton class
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.