gameon 0.0.0.pre36 → 0.0.0.pre37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameon/base.rb +20 -19
- 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: 8b13508a6919b9f8f63aa3bec06ed85d8f885866
|
4
|
+
data.tar.gz: 8f5495c75276c282c9bb7051e398c0cfc6887e58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d001808fad25892bf214a4760d738323946a3fea675615dd8f60b2480470aa9470476f17b972dae76501606a183edd163185bfb857789f18406e8dbf54cca9d
|
7
|
+
data.tar.gz: 51bd413f64c81176a98c6190da9a4e332226253df98639be0ffa840976ca4016eb21ebc1c34aaa699240519242f425e41256289392e450e0095da0b44c5dbf17
|
data/lib/gameon/base.rb
CHANGED
@@ -29,31 +29,32 @@ module GameOn
|
|
29
29
|
|
30
30
|
module Env
|
31
31
|
extend Mushin::Env
|
32
|
+
class << self
|
33
|
+
@domain_folder = 'gameon'
|
34
|
+
@ds = 'GameOn::Persistence::DS'
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
def get id
|
37
|
-
GameOn::Persistence::DS.load id
|
38
|
-
end
|
36
|
+
def get id
|
37
|
+
GameOn::Persistence::DS.load id
|
38
|
+
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
40
|
+
def set id, &block
|
41
|
+
@id = id
|
42
|
+
def on domain_context, &block
|
43
|
+
@domain_context = domain_context
|
44
|
+
@activities = []
|
45
|
+
def activity statment
|
46
|
+
@activities += [statment]
|
47
|
+
end
|
48
|
+
instance_eval(&block)
|
47
49
|
end
|
48
50
|
instance_eval(&block)
|
49
|
-
end
|
50
|
-
instance_eval(&block)
|
51
51
|
|
52
|
-
|
52
|
+
Dir["./#{@domain_folder}/*"].each {|file| load file }
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
Mushin::Engine.setup [Object.const_get(@@ds)]
|
55
|
+
@activities.each do |activity|
|
56
|
+
Mushin::Engine.run @domain_context, activity
|
57
|
+
end
|
57
58
|
end
|
58
59
|
end
|
59
60
|
end
|