Class: ArelExtensions::Nodes::IMatches

Inherits:
Arel::Nodes::Matches
  • Object
show all
Defined in:
lib/arel_extensions/nodes/matches.rb

Direct Known Subclasses

AiIMatches, AiMatches, IDoesNotMatch, SMatches

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left, right, escape = nil) ⇒ IMatches

Returns a new instance of IMatches.



6
7
8
9
10
11
12
13
14
# File 'lib/arel_extensions/nodes/matches.rb', line 6

def initialize(left, right, escape = nil)
  r = Arel.quoted(right)
  if Arel::VERSION.to_i < 7 # managed by default in version 7+ (rails 5), so useful for rails 3 & 4
    super(left, r, escape)
    @case_sensitive = false
  else
    super(left, r, escape, false)
  end
end

Instance Attribute Details

#case_sensitiveObject

Returns the value of attribute case_sensitive.



4
5
6
# File 'lib/arel_extensions/nodes/matches.rb', line 4

def case_sensitive
  @case_sensitive
end