From 4c0a3d48804a363c7e9272519665a21f601b5248 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sat, 24 Feb 2018 17:15:50 +1030 Subject: Arel: rubocop -a --- activerecord/lib/arel/nodes/named_function.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/arel/nodes/named_function.rb') diff --git a/activerecord/lib/arel/nodes/named_function.rb b/activerecord/lib/arel/nodes/named_function.rb index 173838a7fd..1d0baf2885 100644 --- a/activerecord/lib/arel/nodes/named_function.rb +++ b/activerecord/lib/arel/nodes/named_function.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true + module Arel module Nodes class NamedFunction < Arel::Nodes::Function attr_accessor :name - def initialize name, expr, aliaz = nil + def initialize(name, expr, aliaz = nil) super(expr, aliaz) @name = name end @@ -13,7 +14,7 @@ module Arel super ^ @name.hash end - def eql? other + def eql?(other) super && self.name == other.name end alias :== :eql? -- cgit v1.2.3 From 354f1c28e81d9846fb9e5346fcca50cf303c12c1 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Sat, 24 Feb 2018 18:11:47 +1030 Subject: Arel: :nodoc: all --- activerecord/lib/arel/nodes/named_function.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/arel/nodes/named_function.rb') diff --git a/activerecord/lib/arel/nodes/named_function.rb b/activerecord/lib/arel/nodes/named_function.rb index 1d0baf2885..126462d6d6 100644 --- a/activerecord/lib/arel/nodes/named_function.rb +++ b/activerecord/lib/arel/nodes/named_function.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Arel +module Arel # :nodoc: all module Nodes class NamedFunction < Arel::Nodes::Function attr_accessor :name -- cgit v1.2.3