Sha256: 3a271b7b558e4c41499e903155c75db4a251a03820d4732cac97a0b8db5fbe61

Contents?: true

Size: 400 Bytes

Versions: 9

Compression:

Stored size: 400 Bytes

Contents

module Arel
  module Enhance
    module QueryMethods
      class QueryMethod
        attr_reader :subject

        def initialize(subject)
          @subject = subject
        end
      end

      class Ancestors < QueryMethod
        def matches?(other)
          other <= subject
        end
      end

      def self.in_ancestors?(object)
        Ancestors.new(object)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arel_toolkit-0.4.9 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.8 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.7 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.6 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.5 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.4 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.3 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.2 lib/arel/enhance/query_methods.rb
arel_toolkit-0.4.1 lib/arel/enhance/query_methods.rb