hooked 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -164,6 +164,7 @@ To do & Ideas
164
164
  * Visualization of hook flow
165
165
  * Make backtraces more readable
166
166
  * Make Ruby's control flow constructs work for hooks
167
+ * Allow control flow jumps with hookable names
167
168
 
168
169
  Contributing
169
170
  ------------
data/lib/hooked/hook.rb CHANGED
@@ -13,9 +13,9 @@ module Hooked
13
13
  @container, @block = container, block
14
14
  end
15
15
 
16
- def call(context)
16
+ def call(context, hookable = nil)
17
17
  raise RuntimeError, "No container set for hook `#{name}'" unless container
18
- container.instance_exec(context, &@block)
18
+ container.instance_exec(context, hookable, &@block)
19
19
  end
20
20
 
21
21
  def before?
@@ -1,3 +1,3 @@
1
1
  module Hooked
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lars Gierth
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-20 00:00:00 +01:00
17
+ date: 2010-12-27 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency