gameon 0.0.0.pre33 → 0.0.0.pre34
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 +4 -4
- data/lib/gameon/base.rb +25 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46c0cb04ac4848aa1d0bc4dfcb6b822b516083c7
|
4
|
+
data.tar.gz: a6db55dfbcf05814bb7e301b83e1d7582a863257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45ade8b2430e195bb5707b68488f681e827fadfb5460b5da2c08cc224d08869ad0781d5f74ba4a9f6a4576f4b0570c51b13e237fba82db308fdcb6d93d3428ff
|
7
|
+
data.tar.gz: a3b2de7225255b8ee4a955b108d39d6c9b4c7093fe26430c826cdec032d61da940c06696dfcc61f8a694eacb4cc2116b1bbeabdeb1846135f05faad1c904afa7
|
data/lib/gameon/base.rb
CHANGED
@@ -1,16 +1,34 @@
|
|
1
1
|
module GameOn
|
2
|
+
|
3
|
+
module Middleware
|
4
|
+
include Mushin::Middleware
|
5
|
+
end
|
6
|
+
|
2
7
|
module Gamebook
|
3
8
|
extend Mushin::DSL
|
9
|
+
def self.find activity_context, activity_statment
|
10
|
+
Mushin::DSL.middlewares = []
|
11
|
+
Mushin::DSL.contexts.each do |current_context|
|
12
|
+
if activity_context == current_context.title
|
13
|
+
current_context.statments.each do |statment|
|
14
|
+
if activity_statment == statment.title
|
15
|
+
statment.activations.each do |middleware|
|
16
|
+
Mushin::DSL.middlewares << middleware
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
Mushin::DSL.middlewares
|
23
|
+
end
|
4
24
|
end
|
5
25
|
|
6
|
-
module
|
7
|
-
|
26
|
+
module Engine
|
27
|
+
extend Mushin::Engine
|
8
28
|
end
|
9
29
|
|
10
30
|
module Env
|
11
|
-
|
12
|
-
extend Mushin::DSL
|
13
|
-
extend Mushin::Engine
|
31
|
+
extend Mushin::Env
|
14
32
|
|
15
33
|
@domain_folder = 'gameon'
|
16
34
|
@ds = 'GameOn::Persistence::DS'
|
@@ -27,9 +45,9 @@ module GameOn
|
|
27
45
|
def activity statment
|
28
46
|
@activities += [statment]
|
29
47
|
end
|
30
|
-
|
48
|
+
instance_eval(&block)
|
31
49
|
end
|
32
|
-
|
50
|
+
instance_eval(&block)
|
33
51
|
|
34
52
|
Dir["./#{@domain_folder}/*"].each {|file| load file }
|
35
53
|
|