just_maybe 0.2.0 → 0.2.1

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
@@ -16,7 +16,7 @@ Maybe(nil).foo.bar.or_else { 'default' }
16
16
 
17
17
  Add this line to your application's Gemfile:
18
18
 
19
- gem "just_maybe", "~> 0.2.0"
19
+ gem "just_maybe", "~> 0.2.1"
20
20
 
21
21
  And then execute:
22
22
 
@@ -24,8 +24,7 @@ class Maybe < BasicObject
24
24
  end
25
25
 
26
26
  def or_else(&block)
27
- return @object unless @object.nil?
28
- yield
27
+ @object ? @object : yield
29
28
  end
30
29
 
31
30
  def or_a
@@ -1,3 +1,3 @@
1
1
  module JustMaybe
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just_maybe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: