Class: Regexp
Instance Method Summary collapse
-
#to_proc ⇒ Proc
Returns a proc that accepts one argument, that matches against this regexp object.
Instance Method Details
#to_proc ⇒ Proc
Returns a proc that accepts one argument, that matches against this regexp object.
15 16 17 |
# File 'lib/mug/rexproc.rb', line 15 def to_proc lambda {|s| self =~ s } end |