simple-sql 0.4.38 → 0.4.39

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: 4c46da1c022c4c166ffa76a597ab2c2357de1f93ab2c62f979a9dbac983d763f
4
- data.tar.gz: e2b1af9258ad35e64fa845c233e0c8fac11e19d5be3d715255c7b4d56eaf980c
3
+ metadata.gz: cbc1ba2ac08457fcddf1455ab47b006030071b15ca4b9944bf7d4e4a49b9b0fe
4
+ data.tar.gz: b0910c6ecfb1978ecf4d1e42e3017a240e8987152b27a2934b85447f2c33dc89
5
5
  SHA512:
6
- metadata.gz: 235ff8fa9d55221c93d347c4c0f497f75cac530f49ef74f58697fbb9e9c056a5befad61a7cf365ebeae49c7895f06ef5bb01150950cfa0140bf1d35bb4d35191
7
- data.tar.gz: 849232ea61c8478088977240e8d2cc7c987ead8bcbd9e909b14084bc566e55caa6b6d423e642be3f46d5b5a6240f470fe28bdd90e33389e141c00cdcda05e1a5
6
+ metadata.gz: dce03ed034f5625917a9cb6b10607c0422c2ada5aa47921971a800b0e3fb71688680a3d6babee7097d2bdc7556c14b1b21f7c4b3f11c9992ad0922b199401126
7
+ data.tar.gz: 8e3703eef2c956cff3a41f9e5de008b67de2343ae34901cb0f50b37c47e55f6e5a15b22952844a0c1266a1d4c033b1a0a3e728560683570114071b1bcb350857
@@ -65,12 +65,16 @@ class ::Simple::SQL::Result < Array
65
65
  @current_page ||= pagination_scope.page
66
66
  end
67
67
 
68
+ def paginated?
69
+ !! @pagination_scope
70
+ end
71
+
68
72
  private
69
73
 
70
74
  def pagination_scope
71
- return @pagination_scope if @pagination_scope
72
-
73
- raise "Only available only for paginated scopes"
75
+ raise "Only available only for paginated scopes" unless paginated?
76
+
77
+ @pagination_scope
74
78
  end
75
79
 
76
80
  def set_pagination_info(scope)
@@ -1,5 +1,5 @@
1
1
  module Simple
2
2
  module SQL
3
- VERSION = "0.4.38"
3
+ VERSION = "0.4.39"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-sql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.38
4
+ version: 0.4.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - radiospiel