maybe_fun 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: 57511b9a33615172a8f0ef7f1368e5d32c18e79c
4
- data.tar.gz: 4eab32da31e27aa82b9474555c499a0c95e3e212
3
+ metadata.gz: 2e176be640aedb16ee5686124fdfd1845af8857f
4
+ data.tar.gz: 27b3c4c0f33495967893d1412160fd8873720ba8
5
5
  SHA512:
6
- metadata.gz: 559d919cfd4b9864c1b91d07ca60c7dc0d5d75dd7894950bac4129c111c14168f62be02607485ea3af7cf23e8f71c1a75500dcb7f33143060c355a7408778bc8
7
- data.tar.gz: 0ee8dd7f568c5fe67ccc7fae26a13e23207370956f284a1b071655d37ef9c49fa0c843cef97d23f8486abcbff87b2aaa84ffbd15f70a783e32d62c81e6d1bd97
6
+ metadata.gz: a8e35970b02c620a9075dc7e55490267528a5e51fb45fb5399c500a67bf3a814e128800122007668872f25cbe73bfdb280e08db7fcd62065355001104c83e612
7
+ data.tar.gz: 04f1fac292bd1fb211d07e1b262b4ca2cdf19985695af2e674eee2ce3ffbe8f4459fe9af9b6fe12136ceac4f1a5577955ff7460136c440c9a8c6c9ccc4496ed5
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -22,7 +22,37 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ ```
26
+ ' foo '.with(&:strip) # => 'foo'
27
+ nil.with(&:strip) # => nil
28
+ ```
29
+
30
+ ```
31
+ 'foo'.do { puts 'bar' }
32
+ # bar
33
+ # "foo"
34
+
35
+ nil.do { puts 'bar' }
36
+ # nil
37
+ ```
38
+
39
+ ```
40
+ true.if_true { puts 'baz' }
41
+ # baz
42
+ # true
43
+
44
+ false.if_true { puts 'baz' }
45
+ # false
46
+ ```
47
+
48
+ ```
49
+ false.if_false { puts 'quux' }
50
+ # quux
51
+ # true
52
+
53
+ true.if_false { puts 'quux' }
54
+ # true
55
+ ```
26
56
 
27
57
  ## Development
28
58
 
@@ -32,7 +62,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
62
 
33
63
  ## Contributing
34
64
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/maybe_fun. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
65
+ Bug reports and pull requests are welcome on GitHub at https://github.com/blackchestnut/maybe_fun. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
66
 
37
67
 
38
68
  ## License
@@ -7,7 +7,7 @@ class Object
7
7
  alias :unless_null :do
8
8
  alias :also :do
9
9
 
10
- def if_nill
10
+ def if_nil
11
11
  yield if nil?
12
12
  self
13
13
  end
@@ -1,3 +1,3 @@
1
1
  module MaybeFun
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maybe_fun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - blackchestnut