Sha256: 4c2fd3d12ee82a7c8130322ef1dbb2665669cc6a03ff1957aac884f19d45d137

Contents?: true

Size: 401 Bytes

Versions: 5

Compression:

Stored size: 401 Bytes

Contents

# frozen_string_literal: true
module Arel
  module Nodes
    class NamedFunction < Arel::Nodes::Function
      attr_accessor :name

      def initialize name, expr, aliaz = nil
        super(expr, aliaz)
        @name = name
      end

      def hash
        super ^ @name.hash
      end

      def eql? other
        super && self.name == other.name
      end
      alias :== :eql?
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
spiral_form-0.1.1 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/named_function.rb
spiral_form-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/named_function.rb
nullifyable-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/named_function.rb
arel-9.0.0 lib/arel/nodes/named_function.rb
arel-8.0.0 lib/arel/nodes/named_function.rb