paginated_collection 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35aaec9fdb90c734d0719cddc06901b038f8204e
4
- data.tar.gz: f4d3b9f952fd363aeb59566b3ab374b48d27e45f
3
+ metadata.gz: 7a19eb373c578820bb50de00abc72251a0464ade
4
+ data.tar.gz: 6778326b19d8992b283863bb84dcfa34216ab611
5
5
  SHA512:
6
- metadata.gz: 6c3388f1476d8e7c67cb13880dfab630345a0c39e22c5aca8770f65b87a15649b117182b6c134466c0a15d1b9aedb9c080f0a841fbf8256d2d09f7195824e725
7
- data.tar.gz: e8ebeb275e6c8c217e01d6fa29cedcc191749ad943ba34d9850b9f074a525b739390d19a4bad5028d66686afe097cc9616e449e775cf75d5076a21ea8ed476bf
6
+ metadata.gz: 636b3285495217290e67e89d3fb52a1d13dc2d3fe68ccb733151fedf2a1718dc9fd2920a45f59543e5fac5747b3e4d5ad5671e3dbfaa9a73c8cb7a135ca8ca64
7
+ data.tar.gz: f0d6f89d4c61236a18f6b48c70026e0215e645fa8ca26d4e1661c2ce744611d2d9da350d3a2b4db15ea92a028143808e29b132508cd66ff478be7111ca7e8098
@@ -11,5 +11,10 @@ module PaginatedCollection
11
11
 
12
12
  super members
13
13
  end
14
+
15
+ def self.build_with(elems, pagination: {}, &block)
16
+ members = elems.map { |e| block.call(e) }
17
+ self.new(members, pagination)
18
+ end
14
19
  end
15
20
  end
@@ -1,3 +1,3 @@
1
1
  module PaginatedCollection
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginated_collection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sia. S.
@@ -58,7 +58,6 @@ files:
58
58
  - lib/paginated_collection/base.rb
59
59
  - lib/paginated_collection/pagination.rb
60
60
  - lib/paginated_collection/version.rb
61
- - paginated_collection-0.1.0.gem
62
61
  - paginated_collection.gemspec
63
62
  homepage: http://github.com/siassaj/paginated_collection
64
63
  licenses:
Binary file