class Ramaze::Helper::Paginate::Paginator::DataMapperPager

Wrapper for DataMapper::Collection to behave like the Sequel pagination. needs 'datamapper' (or 'dm-core' and 'dm-aggregates')

Public Class Methods

new(*args) click to toggle source
# File lib/ramaze/helper/paginate.rb, line 290
def initialize(*args)
  unless defined?(DataMapper::Aggregates)
    Ramaze::Log.warn "paginate.rb: it is strongly " +
                     "recommended to require 'dm-aggregates'"
  end

  super
end

Public Instance Methods

empty?() click to toggle source
# File lib/ramaze/helper/paginate.rb, line 303
def empty?
  size == 0
end
size() click to toggle source
# File lib/ramaze/helper/paginate.rb, line 299
def size
  @cached_size ||= @array.count
end