neo-dci 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/neo/dci.rb +6 -1
- data/lib/neo/dci/context.rb +6 -3
- data/lib/neo/dci/context_result.rb +9 -0
- data/lib/neo/dci/version.rb +1 -1
- metadata +5 -4
data/lib/neo/dci.rb
CHANGED
data/lib/neo/dci/context.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'on'
|
2
|
-
|
3
1
|
module Neo
|
4
2
|
module DCI
|
5
3
|
class Context
|
@@ -17,13 +15,18 @@ module Neo
|
|
17
15
|
|
18
16
|
def self.call(*args, &block)
|
19
17
|
context = new(*args)
|
20
|
-
context.callback =
|
18
|
+
context.callback = result_class.new(*callbacks, &block)
|
21
19
|
context.call
|
22
20
|
raise NoCallbackCalled, callbacks unless context.callback.callback
|
23
21
|
rescue NotImplementedError
|
24
22
|
raise
|
25
23
|
end
|
26
24
|
|
25
|
+
def self.result_class(klass = :reader)
|
26
|
+
@result_class = klass unless klass == :reader
|
27
|
+
@result_class || ContextResult
|
28
|
+
end
|
29
|
+
|
27
30
|
def call
|
28
31
|
raise NotImplementedError
|
29
32
|
end
|
data/lib/neo/dci/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo-dci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-12-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rake
|
@@ -128,6 +128,7 @@ files:
|
|
128
128
|
- lib/neo-dci.rb
|
129
129
|
- lib/neo/dci.rb
|
130
130
|
- lib/neo/dci/context.rb
|
131
|
+
- lib/neo/dci/context_result.rb
|
131
132
|
- lib/neo/dci/data.rb
|
132
133
|
- lib/neo/dci/role.rb
|
133
134
|
- lib/neo/dci/task_loader.rb
|
@@ -153,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
153
154
|
version: '0'
|
154
155
|
segments:
|
155
156
|
- 0
|
156
|
-
hash:
|
157
|
+
hash: 4234988992783418766
|
157
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
159
|
none: false
|
159
160
|
requirements:
|
@@ -162,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
163
|
version: '0'
|
163
164
|
segments:
|
164
165
|
- 0
|
165
|
-
hash:
|
166
|
+
hash: 4234988992783418766
|
166
167
|
requirements: []
|
167
168
|
rubyforge_project:
|
168
169
|
rubygems_version: 1.8.24
|