Class: RIO::Match::Record::Proc
Instance Method Summary collapse
-
#initialize(arg, therio) ⇒ Proc
constructor
A new instance of Proc.
- #match?(val, recno) ⇒ Boolean
Methods inherited from Base
#inspect, #match_all?, #match_none?, #val
Constructor Details
#initialize(arg, therio) ⇒ Proc
Returns a new instance of Proc.
80 81 82 83 |
# File 'lib/rio/matchrecord.rb', line 80 def initialize(arg,therio) super(arg) @therio = therio end |
Instance Method Details
#match?(val, recno) ⇒ Boolean
84 85 86 87 88 |
# File 'lib/rio/matchrecord.rb', line 84 def match?(val,recno) #p "match?(#{val},#{recno}) select_arg=#{@select_arg}" args = [val,recno,@therio] @select_arg.call(*args[0,@select_arg.arity]) end |