Sha256: d6c56c9fcb78607c941b381ae9b62ee55e56df7cd4cf568b3d1b87f2cd0e4f18

Contents?: true

Size: 637 Bytes

Versions: 14

Compression:

Stored size: 637 Bytes

Contents

module Arel
  module Nodes
    class Unary < Arel::Nodes::Node
      attr_accessor :expr
      alias :value :expr

      def initialize expr
        super()
        @expr = expr
      end

      def hash
        @expr.hash
      end

      def eql? other
        self.class == other.class &&
          self.expr == other.expr
      end
      alias :== :eql?
    end

    %w{
      Bin
      Cube
      DistinctOn
      Group
      GroupingElement
      GroupingSet
      Limit
      Lock
      Not
      Offset
      On
      Ordering
      RollUp
      Top
    }.each do |name|
      const_set(name, Class.new(Unary))
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-7.1.4/lib/arel/nodes/unary.rb
abaci-0.3.0 vendor/bundle/gems/arel-7.1.0/lib/arel/nodes/unary.rb
arel-7.1.4 lib/arel/nodes/unary.rb
arel-7.1.3 lib/arel/nodes/unary.rb
arel-7.1.2 lib/arel/nodes/unary.rb
arel-7.1.1 lib/arel/nodes/unary.rb
arel-7.1.0 lib/arel/nodes/unary.rb