dimples 7.0.2 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3ea00fe31ee988acc15a95454594f0d63287ded91d987f0518dd4c3d92e63c4
4
- data.tar.gz: d81b643d433efe3d6fdbd77c6150a936c53cc5f18c034c029aa03fb3b2ad3487
3
+ metadata.gz: 8fd729f8831f7117dec77633ca687cb478952d674c26e1c4720f12bc2a019ff8
4
+ data.tar.gz: ecc6f32cb1c207f1b1c57bec0ec770706680a86f3c9ef75796a61ad9eea7e89a
5
5
  SHA512:
6
- metadata.gz: 0f735e7a99b299949a0575f035153fe037fb9d05c987d2cec6d199814c55fdc076f5f20f6d6079d0ffb27a747c8c27b98207b706e3382a0fb24aab99a826a0da
7
- data.tar.gz: '085264bed45ab98e9c932ba36e15136c06cf8d68fcde793761219fb662fb3f56f66e71bf1ae8d4dda45a99ac09a872c90f61091a2c55a7cb1273a842457a2c21'
6
+ metadata.gz: e75b7b11f69b44d2015cd0262c1c3d93f87df7f78af881ef193e2de6b63e8ece2f0ae31649d73f27dbeb15c3a676c9a05b178a48f768ee1416abfe132a29fdbd
7
+ data.tar.gz: c8e6a752a8b64b5aeae3cefa9faf82f3a1d25d7051c664a93ad2ec6f813274805feae18f19adeefe4c8ae8cc14ac3f4ce85163ec1fd3a305905d2229b0098ff5
data/lib/dimples/pager.rb CHANGED
@@ -11,11 +11,11 @@ module Dimples
11
11
  attr_reader :next_page
12
12
  attr_reader :page_count
13
13
 
14
- def initialize(url, posts)
14
+ def initialize(url, posts, options = {})
15
15
  @url = url
16
16
  @posts = posts
17
- @per_page = PER_PAGE
18
- @page_prefix = 'page_'
17
+ @per_page = options.fetch(:per_page, PER_PAGE)
18
+ @page_prefix = options.fetch(:page_prefix, 'page_')
19
19
  @page_count = (posts.length.to_f / @per_page.to_i).ceil
20
20
 
21
21
  step_to(1)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '7.0.2'
4
+ VERSION = '7.0.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2
4
+ version: 7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan