null_association 1.0.0.pre.rc.1 → 1.0.0

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: 48a3698a82078bbaf946f0f9641a040eeaff9d01cdffc12095682bd92f303b90
4
- data.tar.gz: '069daf7962c4033fbf9e75aca18e921e1d7c0333615318fe5d80cf0369068d39'
3
+ metadata.gz: df1aea40cbaa84f084b9496ea365f88b740e39ea75b80275d061ec9abaa0cb8c
4
+ data.tar.gz: 3b4efa03752c5f71b1bbd2f22f3c6fb5ecdcf8d244b2c406a7d9ee6415e05102
5
5
  SHA512:
6
- metadata.gz: a86914e281b47ebcc852fcd4b9300bd6d168e58d3a66439aa18bf6787525285ae1c828f2a9f721b2a68b3c93081a4768499be09af2bbfdacd13fe52cc7c1c7bf
7
- data.tar.gz: '0914e87d2a2e67f6f441b2ec152a617772128994cac5bf3ae896920fcd4aef4cb0fd956807eedba67b1c285b25fce2180250d30ce19e402040a606ef9e3189f4'
6
+ metadata.gz: '02365904b42590f622b0c933c28c6580d9488d06c05c50b5830c318a76d51b3271bdc4092810ebc98cce8cefb68d0f2689cd359c697dadc8958b1645bff78e19'
7
+ data.tar.gz: 979e4b663c4facd667240d70b48b291ed8a4ef14a7763248da5018667f1af29cc01ba3420ef3f7a95ec87ecbf5fcafa08825858b73d872560ac833df5836a63f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # Changelog
2
2
 
3
3
  ## [Unreleased]
4
+
5
+ ## v1.0.0
6
+
7
+ Initial release.
data/README.md CHANGED
@@ -41,13 +41,20 @@ $ gem install null_association
41
41
  ## Usage
42
42
 
43
43
  To use a null object, define an optional singular association and use the
44
- `null_object:` keyword, which accepts a class, a string, or an instance. When
45
- the association is nil, the null object will be returned instead.
44
+ `null_object:` keyword, which accepts a class name, a class, or an instance.
45
+ When the association is nil, the null object will be returned instead.
46
46
 
47
47
  ```ruby
48
- class NullPlan
48
+ class NullObject
49
49
  include Singleton
50
50
 
51
+ def present? = false
52
+ def blank? = true
53
+ end
54
+ ```
55
+
56
+ ```ruby
57
+ class NullPlan < NullObject
51
58
  def name = 'Free'
52
59
  def free? = true
53
60
  def pro? = false
@@ -56,9 +63,7 @@ end
56
63
  ```
57
64
 
58
65
  ```ruby
59
- class NullBilling
60
- include Singleton
61
-
66
+ class NullBilling < NullObject
62
67
  def subscribed? = true
63
68
  def trialing? = false
64
69
  def canceled? = false
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NullAssociation
4
- VERSION = '1.0.0-rc.1'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: null_association
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.rc.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeke Gabrielse
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-15 00:00:00.000000000 Z
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -126,9 +126,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  version: '3.1'
127
127
  required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 1.3.1
131
+ version: '0'
132
132
  requirements: []
133
133
  rubygems_version: 3.4.13
134
134
  signing_key: