123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::Regexp

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Arel::Nodes::Binary
Defined in: activerecord/lib/arel/nodes/regexp.rb

Class Method Summary

Instance Attribute Summary

Binary - Inherited

Node - Inherited

Instance Method Summary

Constructor Details

.new(left, right, case_sensitive = true) ⇒ Regexp

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/regexp.rb', line 8

def initialize(left, right, case_sensitive = true)
  super(left, right)
  @case_sensitive = case_sensitive
end

Instance Attribute Details

#case_sensitive (rw)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/regexp.rb', line 6

attr_accessor :case_sensitive

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/regexp.rb', line 20

alias :== :eql?

#eql?(other) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/regexp.rb', line 17

def eql?(other)
  super && self.case_sensitive == other.case_sensitive
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/regexp.rb', line 13

def hash
  [super, @case_sensitive].hash
end