Sha256: 5981f6974cc40dd33f4cfdf2d05a0ff0fdaf714335399530f6e25dd48e4e4141
Contents?: true
Size: 706 Bytes
Versions: 12
Compression:
Stored size: 706 Bytes
Contents
module AgnosticBackend module Queryable class ResultSet include Enumerable attr_reader :raw_results, :query def initialize(raw_results, query) @raw_results, @query = raw_results, query end def each(&block) filtered_results.each do |result| block.call(transform(result)) end end def empty? none? end def total_count raise NotImplementedError end def offset raise NotImplementedError end private def filtered_results raise NotImplementedError end def transform(result) raise NotImplementedError end end end end
Version data entries
12 entries across 12 versions & 1 rubygems