minicontext 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: 6c1e4e27ace275f77773f39ef51a39bc75b99258
4
- data.tar.gz: ed67bd70ede0a00ffbf919c541be9bcca2597825
3
+ metadata.gz: 42605728735555a7f88b9ad4a1af93d5941e9841
4
+ data.tar.gz: f0067e7bf66e127c4c2ddc038d30320159f5b3e0
5
5
  SHA512:
6
- metadata.gz: 1221980c7636234c8e4e225ef8d734a79b78ab0abd146d991daf6b3485bab1f5e6d82f3b4aeb1d6a2ded54463ca6c1e4c132e40335ea427b03b5f46d915114f6
7
- data.tar.gz: 1c09c60814b3301a5773e8ab97c476d6d6247b7ecd6c7716ed1cc8a23c101000d8bda6a05fa4d38701cd522b03a8a6320ce7985df068d36a0c63a4a1b55b620e
6
+ metadata.gz: 6cc8432872e37191c15cdf351bcf5c1763f01c3132bd280886a92746bd2ae5fae3bf7206d9826c79947c424e8f029e5bdad54c19b1b7388b773f7172a1dd0219
7
+ data.tar.gz: 294ca22c3823e21ed23ed3b8ead0b41d41117150ac2f1e4f72384bbe3b5bb7ed5258bc9011de846a18f8cb7444b5e84c614df1dba872a387f2d17176874723eb
data/README.md CHANGED
@@ -6,7 +6,7 @@ Mimicontext is a DSL kit.
6
6
 
7
7
  ## Installation
8
8
 
9
- `Gemfile`:
9
+ Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
12
  gem 'minicontext'
@@ -30,10 +30,14 @@ module Minicontext
30
30
  instance_eval(&block)
31
31
  end
32
32
 
33
+ def short_circuit?
34
+ Halt === @response
35
+ end
36
+
33
37
  def call(context, &block)
34
38
  @context = context
35
39
 
36
- bind(Halt === @response ? @response : action(&block))
40
+ bind(short_circuit? ? @response : action(&block))
37
41
  end
38
42
 
39
43
  private
@@ -1,3 +1,3 @@
1
1
  module Minicontext
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minicontext
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
  - daisuko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-08 00:00:00.000000000 Z
11
+ date: 2015-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler