Class: Regexp

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyexcel.rb

Overview

Ruby’s standard Regexp class.

Instance Method Summary collapse

Instance Method Details

#to_procObject

A bit of “syntactic sugar” which allows shorthand Regexp blocks

Examples:

sheet.filter!( 'Part', &/Type[13]/ )


17
18
19
# File 'lib/rubyexcel.rb', line 17

def to_proc
  proc { |s| self =~ s.to_s }
end