Sha256: 24dcbc5903743d10a43539951a86df4d86237a03fb79f5cf78bcc434673561e1

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

module RademadeAdmin
  module Search
    class Abstract

      attr_reader :params

      def initialize(params, origin_fields)
        @params = params
        @origin_fields = origin_fields
      end

      def conditions
        @conditions ||= init_conditions
      end

      protected

      def init_conditions
        {
          :where => where,
          :order => order,
          :page => page,
          :per_page => per_page,
          :limit => limit
        }
      end

      def where
        {
          :or => {},
          :and => {}
        }
      end

      def order
        {}
      end

      def page
        nil
      end

      def per_page
        nil
      end

      def limit
        nil
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rademade_admin-0.0.1 app/services/search/conditions/abstract.rb