shokkenki-consumer 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,10 +60,18 @@ module Shokkenki
60
60
  end
61
61
 
62
62
  def to &block
63
+ # allows caller context and order to both be referenced from block
64
+ # see http://www.dan-manges.com/blog/ruby-dsls-instance-eval-with-delegation (instance_eval + delegation)
65
+ @caller_context = eval 'self', block.binding
66
+
63
67
  instance_eval &block
64
68
  validate!
65
69
  @patronage.add_interaction to_interaction
66
70
  end
71
+
72
+ def method_missing(method, *args, &block)
73
+ @caller_context.send method, *args, &block
74
+ end
67
75
  end
68
76
  end
69
77
  end
@@ -1,7 +1,7 @@
1
1
  module Shokkenki
2
2
  module Consumer
3
3
  module Version
4
- STRING = '1.0.0'
4
+ STRING = '1.0.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shokkenki-consumer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-24 00:00:00.000000000 Z
12
+ date: 2014-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -265,11 +265,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
265
265
  version: '0'
266
266
  segments:
267
267
  - 0
268
- hash: -351442430586410942
268
+ hash: 1445690267303160436
269
269
  requirements: []
270
270
  rubyforge_project:
271
271
  rubygems_version: 1.8.23
272
272
  signing_key:
273
273
  specification_version: 3
274
- summary: shokkenki-consumer-1.0.0
274
+ summary: shokkenki-consumer-1.0.1
275
275
  test_files: []