class ActiveRecord::HashOptions::REGEXP
typically, a Regexp will go through, so this should not becalled this is here to group proc for regexp with others
Public Class Methods
arel_proc()
click to toggle source
# File lib/active_record/hash_options/operators.rb, line 124 def self.arel_proc proc do |column, op| regexp_text = Arel::Nodes.build_quoted(op.source, column) case_sensitive = (op.options & Regexp::IGNORECASE == 0) Arel::Nodes::Regexp.new(column, regexp_text, case_sensitive) end end
Public Instance Methods
call(val)
click to toggle source
# File lib/active_record/hash_options/operators.rb, line 132 def call(val) val && val =~ expression end