Sha256: 8f78a5113449d94287c56bc36a2fb3d0b25c1862359d4f816cb5c06f477fb2d4

Contents?: true

Size: 472 Bytes

Versions: 2

Compression:

Stored size: 472 Bytes

Contents

module Admino
  module Query
    class Builder
      attr_accessor :scope
      attr_reader :context

      def initialize(context, scope)
        @context = context
        @scope = scope
      end

      private

      def method_missing(method, *args)
        if context.respond_to?(method)
          Builder.new(context, context.send(method, scope, *args))
        else
          Builder.new(context, scope.send(method, *args))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
admino-0.0.18 lib/admino/query/builder.rb
admino-0.0.17 lib/admino/query/builder.rb