I want to extend the Proc class so that its constructor can also take a hash of arguments with will be converted into methods with some meta programming construct. Something to the effect of:
p = Proc.new(this: 100, that: 200, yes: 1, no: 2) { |arg| arg.even? }
p.call(1) # => false
p.this # => 100
p.yes # => 1
I want to know the ruby way of doing something like this.