Class: Regexp

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

Overview

Ruby’s standard Regexp class.

Regexp#to_proc is a bit of "syntactic sugar" which allows shorthand Regexp blocks

Examples:

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

Instance Method Summary collapse

Instance Method Details

#to_procObject



14
15
16
# File 'lib/rubyexcel.rb', line 14

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