Sha256: ea95458cbf793b7a8eeec89b5b6e212fdbfea623e97451cf58a2ff4983600472

Contents?: true

Size: 300 Bytes

Versions: 55

Compression:

Stored size: 300 Bytes

Contents

class LHS::Pagination::Page < LHS::Pagination::Base

  DEFAULT_OFFSET = 1

  def current_page
    offset
  end

  def next_offset(step = 1)
    self.class.next_offset(current_page, limit, step)
  end

  def self.next_offset(current_page, _limit, step = 1)
    current_page.to_i + step.to_i
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
lhs-15.3.1.pre.fixlhc.1 lib/lhs/pagination/page.rb
lhs-15.3.0 lib/lhs/pagination/page.rb
lhs-15.2.5 lib/lhs/pagination/page.rb
lhs-15.2.4 lib/lhs/pagination/page.rb
lhs-15.2.3 lib/lhs/pagination/page.rb
lhs-15.2.3.pre.favorites.1 lib/lhs/pagination/page.rb
lhs-15.2.2.pre.favorites.1 lib/lhs/pagination/page.rb
lhs-15.2.2 lib/lhs/pagination/page.rb
lhs-15.2.1 lib/lhs/pagination/page.rb
lhs-15.2.0 lib/lhs/pagination/page.rb
lhs-15.1.1 lib/lhs/pagination/page.rb
lhs-15.1.0 lib/lhs/pagination/page.rb
lhs-15.0.2 lib/lhs/pagination/page.rb
lhs-15.0.1 lib/lhs/pagination/page.rb
lhs-15.0.0 lib/lhs/pagination/page.rb
lhs-14.6.5 lib/lhs/pagination/page.rb
lhs-14.6.4 lib/lhs/pagination/page.rb
lhs-14.6.3 lib/lhs/pagination/page.rb
lhs-14.6.2 lib/lhs/pagination/page.rb
lhs-14.6.1 lib/lhs/pagination/page.rb