Sha256: ee6d7739ffb13d593a2026ee9c0614551fd098d811b57057fb8bbb0a209e89dc

Contents?: true

Size: 586 Bytes

Versions: 24

Compression:

Stored size: 586 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
      Group
      Having
      Limit
      Not
      Offset
      On
      Ordering
      Top
      Lock
      DistinctOn
    }.each do |name|
      const_set(name, Class.new(Unary))
    end
  end
end

Version data entries

24 entries across 21 versions & 7 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/arel-6.0.4/lib/arel/nodes/unary.rb
arel-6.0.4 lib/arel/nodes/unary.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/arel-6.0.3/lib/arel/nodes/unary.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/nodes/unary.rb
angular-rails4-templates-0.4.1 vendor/ruby/2.1.0/gems/arel-6.0.3/lib/arel/nodes/unary.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/nodes/unary.rb
angular-rails4-templates-0.4.0 vendor/ruby/2.1.0/gems/arel-6.0.3/lib/arel/nodes/unary.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-6.0.3/lib/arel/nodes/unary.rb
angular-rails4-templates-0.3.0 vendor/ruby/2.1.0/gems/arel-5.0.1.20140414130214/lib/arel/nodes/unary.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/arel-6.0.3/lib/arel/nodes/unary.rb
arel-6.0.3 lib/arel/nodes/unary.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/arel-6.0.0/lib/arel/nodes/unary.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/arel-6.0.0/lib/arel/nodes/unary.rb
arel-6.0.2 lib/arel/nodes/unary.rb
arel-6.0.1 lib/arel/nodes/unary.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/arel-6.0.0/lib/arel/nodes/unary.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/arel-6.0.0/lib/arel/nodes/unary.rb
arel-6.0.0 lib/arel/nodes/unary.rb
arel-6.0.0.beta2 lib/arel/nodes/unary.rb
arel-6.0.0.beta1 lib/arel/nodes/unary.rb