4 ms·
Even if it's not an instance method you can write the first as validated_items = items.select(&method(:is_validated?)) (Typed on my phone but I'm pretty sur
by lparry 10y ago
Even if it's not an instance method you can write the first as
validated_items = items.select(&method(:is_validated?))
(Typed on my phone but I'm pretty sure that's the right syntax)
- brobinson 10y agoIt is! I'd forgotten about Kernel.method. Thanks!