Sha256: 36e8f4647433a961db9e810be2fdbff92effee973fe3422fd777140fbe3f1739

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require 'active_support/concern'
require 'forwardable'

module PlainModel
  module Modeling
    module Queryable
      delegate :where, :includes, :except, to: :all
      delegate :to_a, :first, :last, :each, :collect, :map, :select, :detect, to: :all

      def _query_builder
        ::PlainModel::QueryBuilder.new(self)
      end

      def all
        _query_builder
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plain_model-0.2.1 lib/plain_model/modeling/queryable.rb
plain_model-0.2.0 lib/plain_model/modeling/queryable.rb
plain_model-0.1.0 lib/plain_model/modeling/queryable.rb