getto-repository
Repository helper
require "getto/repository/page"
Getto::Repository::Page.new(count: 0, limit: 100).pages # => 0
Getto::Repository::Page.new(count: 1, limit: 100).pages # => 1
Getto::Repository::Page.new(count: 50, limit: 100).pages # => 1
Getto::Repository::Page.new(count: 100, limit: 100).pages # => 1
Getto::Repository::Page.new(count: 101, limit: 100).pages # => 2
Getto::Repository::Page.new(count: 200, limit: 100).pages # => 2
Getto::Repository::Page.new(count: 202, limit: 100).pages # => 3
Table of Contents
- Requirements
- Usage
- License
Requirements
- developed on ruby: 2.5.1
Usage
Install
Add this line to your application's Gemfile:
gem 'getto-repository'
And then execute:
$ bundle
Or install it yourself as:
$ gem install getto-repository
License
getto/repository is licensed under the MIT license.
Copyright © since 2018 shun@getto.systems