material 0.2.8 → 0.2.9

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: 20af6ddecc1eedcc033ea158e929485648543c1eb9cee355fe6629792b09608b
4
- data.tar.gz: 06db5ee769af6574fba033c788ec8fa71770110a8600b162084a8536d8c6f06f
3
+ metadata.gz: 047af7d49a83c2ad4b9a19d3c213327ae21538a5e6063c6b464841c839459fb4
4
+ data.tar.gz: 930346af738b233c2724de6f80200eae88a8f640c7a6f822c500ab53b5a69715
5
5
  SHA512:
6
- metadata.gz: b45e69fa158cdf5ffd850685c3d99a43e00753041087e0df7463e4386e475978e96bd5c294c6b01d04b1d4556fadf4f4aa3f92d20096b4e3018266ea78d446b8
7
- data.tar.gz: b3c7cb799ac7d1c1ee2638a7458a78c3a497508fe8e6f7aff025003157fb337b442fb074a0629aaeb9b71f92829eb503f651e865614b2c4cc16049472708d43b
6
+ metadata.gz: 79c5720bd197a514ca5b214b63eaddd670921920f89f840dd9d266c05560bbf619d8ba9d905892e6033669051b01c17317073ada36d9e3b6d62397c352c7b75d
7
+ data.tar.gz: 19d43b60c7eb4c1db11ccf9bb2f4148b40e5a654770057a95a77f1b9aa12b050c03fbb35a6bc684c5733fcdd4a4032d976fab0cf8b21fac005b1d28eb606f2cb
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Material
4
+ module Pagination
5
+ extend ActiveSupport::Concern
6
+
7
+ included do
8
+ attr_reader :current_page, :total_pages
9
+ end
10
+
11
+ def initialize(*arguments, current_page: 1, total_pages: 1)
12
+ super(*arguments)
13
+ @current_page = current_page
14
+ @total_pages = total_pages
15
+ end
16
+ end
17
+ end
data/lib/material/list.rb CHANGED
@@ -11,6 +11,7 @@ module Material
11
11
  include Material::Text
12
12
  include Material::Site
13
13
  include Material::For
14
+ include Material::Pagination
14
15
 
15
16
  def self.for(object)
16
17
  material_class = material_class_for(object, "List")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Material
4
- VERSION = "0.2.8"
4
+ VERSION = "0.2.9"
5
5
  end
data/lib/material.rb CHANGED
@@ -10,6 +10,7 @@ require_relative "material/concerns/icon"
10
10
  require_relative "material/concerns/text"
11
11
  require_relative "material/concerns/site"
12
12
  require_relative "material/concerns/for"
13
+ require_relative "material/concerns/pagination"
13
14
 
14
15
  require "material/version"
15
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Garside
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-30 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -212,6 +212,7 @@ files:
212
212
  - lib/material/concerns/core.rb
213
213
  - lib/material/concerns/for.rb
214
214
  - lib/material/concerns/icon.rb
215
+ - lib/material/concerns/pagination.rb
215
216
  - lib/material/concerns/site.rb
216
217
  - lib/material/concerns/text.rb
217
218
  - lib/material/list.rb