believer 0.2.6 → 0.2.7

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.
data/README.md CHANGED
@@ -76,6 +76,8 @@ album_sales.sales.incr(6) # Increment counter by 3, value is 7
76
76
  album_sales.sales.decr # Decrement counter by 1, value is 6
77
77
  album_sales.sales.decr(3) # Decrement counter by 3, value is 3
78
78
  album_sales.sales.reset! # Reset it to the initial value, which is 0
79
+ album_sales.sales = 4 # Explicitly set the value...
80
+ album_sales.sales.to_i # ...which is now 4
79
81
  ```
80
82
 
81
83
  #### The primary_key class method
@@ -13,7 +13,10 @@ module Believer
13
13
  end
14
14
 
15
15
  def adopt_value(v)
16
- @value = 0 if v.nil?
16
+ if v.nil?
17
+ @value = 0
18
+ return self
19
+ end
17
20
  @value = v.to_i
18
21
  self
19
22
  end
@@ -1,5 +1,5 @@
1
1
  module Believer
2
2
  module Version
3
- VERSION = '0.2.6'
3
+ VERSION = '0.2.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: believer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: