~/talk

Control methods like a pro: A guide to Ruby's awesomeness, a.k.a. metaprogramming

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby]
slides:none on file

Shows that methods are objects and gives exact recipes: list methods, use method/instance_method to fetch Method and UnboundMethod, bind or unbind, inspect parameters and source_location, and redefine by remove_method/define_method while preserving privacy. Builds a tiny_hooks library that implements before/after/around hooks for instance and class methods, binds unbound originals when needed, and benchmarks as tiny_hooks 1.6× faster than Active Support callbacks, so the hook approach actually works.

AI-written summary · about

  1. 0:00Introduction
  2. 0:55Many tests
  3. 6:05Part 1 No
  4. 6:35Part 2 No
  5. 7:23Methods that list methods
  6. 9:31Methods that fetch method
  7. 11:20Method objects
  8. 11:44Method classes
  9. 16:20Logic class
  10. 19:05Definition
  11. 19:20Methods
  12. 22:50TinyHooks
  13. 27:46Conclusion
~/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.