2017-02-13 13:58:58 -05:00
|
|
|
# frozen_string_literal: true
|
2018-02-24 01:45:50 -05:00
|
|
|
|
2018-02-24 02:41:47 -05:00
|
|
|
module Arel # :nodoc: all
|
2014-09-24 22:01:33 -04:00
|
|
|
module Nodes
|
|
|
|
class Matches < Binary
|
|
|
|
attr_reader :escape
|
2015-12-05 18:54:09 -05:00
|
|
|
attr_accessor :case_sensitive
|
2014-09-24 22:01:33 -04:00
|
|
|
|
2015-12-05 18:54:09 -05:00
|
|
|
def initialize(left, right, escape = nil, case_sensitive = false)
|
2014-09-24 22:01:33 -04:00
|
|
|
super(left, right)
|
|
|
|
@escape = escape && Nodes.build_quoted(escape)
|
2015-12-05 18:54:09 -05:00
|
|
|
@case_sensitive = case_sensitive
|
2014-09-24 22:01:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
class DoesNotMatch < Matches; end
|
|
|
|
end
|
|
|
|
end
|