Sha256: 19317bf7558d33c01c25fb739ff4aadd92460c4fa8043c7ab568b8c59961980b

Contents?: true

Size: 441 Bytes

Versions: 23

Compression:

Stored size: 441 Bytes

Contents

require 'volt/models/persistors/base'

module Volt
  module Persistors
    class Page < Base
      def auto_generate_id
        true
      end

      def where(query)
        @model.select do |model|
          # Filter through each part of the query and make sure it matches.
          query.each_pair do |key, value|
            next false unless model.get(key) == value
          end

          true
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
volt-0.9.5 lib/volt/models/persistors/page.rb
volt-0.9.5.pre12 lib/volt/models/persistors/page.rb
volt-0.9.5.pre11 lib/volt/models/persistors/page.rb
volt-0.9.5.pre9 lib/volt/models/persistors/page.rb
volt-0.9.5.pre8 lib/volt/models/persistors/page.rb
volt-0.9.5.pre7 lib/volt/models/persistors/page.rb
volt-0.9.5.pre6 lib/volt/models/persistors/page.rb
volt-0.9.5.pre5 lib/volt/models/persistors/page.rb
volt-0.9.5.pre4 lib/volt/models/persistors/page.rb
volt-0.9.5.pre3 lib/volt/models/persistors/page.rb
volt-0.9.5.pre2 lib/volt/models/persistors/page.rb
volt-0.9.5.pre1 lib/volt/models/persistors/page.rb
volt-0.9.4 lib/volt/models/persistors/page.rb
volt-0.9.4.pre5 lib/volt/models/persistors/page.rb
volt-0.9.4.pre3 lib/volt/models/persistors/page.rb
volt-0.9.4.pre2 lib/volt/models/persistors/page.rb
volt-0.9.4.pre1 lib/volt/models/persistors/page.rb
volt-0.9.3 lib/volt/models/persistors/page.rb
volt-0.9.3.pre6 lib/volt/models/persistors/page.rb
volt-0.9.3.pre5 lib/volt/models/persistors/page.rb