superfeature 0.1.8 → 0.1.9

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
  SHA256:
3
- metadata.gz: a58671cf3adcbfe8c43bf36cfcac421cfc5a43bf4b68e9cbf894a5f2e1e72e48
4
- data.tar.gz: '08dcb7627301e5319c0a9ba9210dba96648884384ac28e08a511779e837b3d50'
3
+ metadata.gz: f03f181c8fefa1f23c8d7a9d967e59c01843f38c6b68299bcc8a546bbe2449eb
4
+ data.tar.gz: c0c7d905790bffef579df05a2a11f5e09c99d7163c5e71a803ce9c27c88c4385
5
5
  SHA512:
6
- metadata.gz: 5168c95720797f8eeb41cf7328d3f9af24bc91c7a335522c7043e6c5683ec45db6668de0d1bc8e43bb30ede7dbb3954406371e0f504c95ff7d4ef240aa4db78c
7
- data.tar.gz: a1f74279a8a32deec8fdddec2cdaad4018292e9e9b0a0b8aa61b3bd8a6b9ab360da78cf60387057d7b5a5b3b35af2d5352b3fdeac0cee02f0359278227ed6173
6
+ metadata.gz: 0f9d990be1a75a702ff031e82df20a87e729a494fae1f3b854dbfc42be79a6b02e505f503acbb74eccbb8fb2f0028ee1e66dd568a6232e530719ab98afe09098
7
+ data.tar.gz: 4728a318c1c006f9d6cf43bac7a6e09f6f80210881629a58f5d6caa72e08d758becd31070006107ec8929ac8b3639c52109978deeb15f250c24a0bc4550f5b6d
@@ -6,7 +6,7 @@ module Superfeature
6
6
 
7
7
  attr_reader :limit
8
8
  def_delegators :limit, :enabled?, :disabled?
9
- def_delegators :limit, :quantity, :maximum, :remaining, :exceeded?
9
+ def_delegators :limit, :quantity, :maximum, :remaining, :remaining?, :exceeded?
10
10
 
11
11
  def initialize(limit: Limit::Base.new)
12
12
  @limit = limit
@@ -22,8 +22,12 @@ module Superfeature
22
22
  maximum - quantity
23
23
  end
24
24
 
25
+ def remaining?
26
+ remaining > 0
27
+ end
28
+
25
29
  def exceeded?
26
- quantity > maximum if quantity and maximum
30
+ quantity >= maximum if quantity and maximum
27
31
  end
28
32
 
29
33
  def enabled?
@@ -1,3 +1,3 @@
1
1
  module Superfeature
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superfeature
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-01-21 00:00:00.000000000 Z
10
+ date: 2026-02-11 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails