chainable_methods 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: d4bb132eff83680c2108d026320a9651a2d8f612
4
- data.tar.gz: fecb905cf761a1b5a43c5f5dc3307bf4450e46d4
3
+ metadata.gz: a3ba65326dbdf9e52dc0cc60ac86f30a8463e11e
4
+ data.tar.gz: 676a58f53f7c3304d9ec84e449259d3251c3cacb
5
5
  SHA512:
6
- metadata.gz: 0d4fa21b5a889ce08c598ead1283742050b10759e4c2ea8646ac8ff3c9e0a451e6c83dcc54491ef4e443c328003ad56d4490e63c2eb76fdeb938e8916d090664
7
- data.tar.gz: 35efa65f538a0753db47973d30d2f799e45f7d0b4206dd88e85ce6fedab0d5fbd29ac1e458a919906f4ae7a5c1a262cf04b2cb4e4b02a3f539cc22eee6ad5bce
6
+ metadata.gz: 39617913f8991b301f54cc1fb79ebd1dcab4ffab9898bfc80fe920d0a5776e9124ba0c42efd5c95a760b3c8202f99ac0d89a296ca300afd5e94e5cfaef324cd9
7
+ data.tar.gz: 3114b059d897afb0b82f4aa9f2b60fdc5f0de3685bff2b7d1a141c9e6029ce2afa058dcc8044f375ba548dfb477755d5af4cbb0d47506d7cbac4883a251a116a
data/README.md CHANGED
@@ -106,6 +106,25 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
106
106
 
107
107
  Bug reports and pull requests are welcome on GitHub at https://github.com/akitaonrails/chainable_methods. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
108
108
 
109
+ ## CHANGELOG
110
+
111
+ v0.1.0
112
+ - initial version
113
+
114
+ v0.1.1
115
+ - introduces the ability to wrap any plain ruby object, without the need for a special module to extend the ChainableMethods module first.
116
+ - fixes the priority of methods to call if both state and context has the same method, context always has precedence
117
+
118
+ v0.1.2
119
+ - introduces a shortcut global method 'CM' to be used like this:
120
+
121
+ ```
122
+ CM(['a', 'b', 'c'], 2)
123
+ .[]
124
+ .upcase
125
+ .unwrap
126
+ # => "C"
127
+ ```
109
128
 
110
129
  ## License
111
130
 
@@ -37,4 +37,6 @@ module ChainableMethods
37
37
  end
38
38
 
39
39
  # easier shortcut
40
- CM ||= ChainableMethods
40
+ def CM(context, initial_state)
41
+ ChainableMethods.wrap(context, initial_state)
42
+ end
@@ -1,3 +1,3 @@
1
1
  module ChainableMethods
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: chainable_methods
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
  - AkitaOnRails