← Graph

Use === to put Procs in case/when

takeaway 2 connections

Practical recommendation from the talk: because Proc responds to `===` and `case/when` dispatches via `===`, any Proc can be used directly as a `when` condition (since Ruby 2.2). Małaszkiewicz confirms she actually uses this pattern with Rails Event Store procs in production.

type
recommendation
takeaway Use === to put Procs in case/when
about
Takeaway explicitly about the === proc-call behavior.
takeaway Use === to put Procs in case/when
from_talk
Key practical takeaway of the talk.

Provenance

Read by
1 extraction