Class: SexyScopes::Arel::Nodes::RegexpMatches

Inherits:
Arel::Nodes::InfixOperation
  • Object
show all
Defined in:
lib/sexy_scopes/arel/nodes/regexp_matches.rb

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ RegexpMatches

Returns a new instance of RegexpMatches.



5
6
7
8
# File 'lib/sexy_scopes/arel/nodes/regexp_matches.rb', line 5

def initialize(left, right)
  right = Regexp.try_convert(right) || Regexp.compile(right.to_s)
  super(:REGEXP, left, right)
end