Class: RIO::Match::Record::Proc

Inherits:
Base show all
Defined in:
lib/rio/matchrecord.rb

Instance Method Summary collapse

Methods inherited from Base

#inspect, #match_all?, #match_none?, #val

Constructor Details

#initialize(arg, therio) ⇒ Proc

Returns a new instance of Proc.



67
68
69
70
# File 'lib/rio/matchrecord.rb', line 67

def initialize(arg,therio)
  super(arg)
  @therio = therio
end

Instance Method Details

#match?(val, recno) ⇒ Boolean

Returns:

  • (Boolean)


71
72
73
74
# File 'lib/rio/matchrecord.rb', line 71

def match?(val,recno)
  args = [val,recno,@therio]
  @select_arg.call(*args[0,@select_arg.arity])
end