I'm trying to send a parameter to a Ruby proc
p1 = [54, 21, 45, 76, 12, 11, 67, 5]
qualify = proc { |age, other| age > other }
puts p1.select(&qualify(30))
This is the error I get:
undefined method `qualify' for main:Object
age comes from the iteration of the array, and I want to have that last parameter (30) to get into the proc.
Is a proc the right tool to be using for this? I'm new to proc. I'm unclear how to get that parameter in there.
procsthat I can throwparamsat.procversion so I can learn them.