gameon 0.0.0.pre55 → 0.0.0.pre56
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 +21 -22
- 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: 6908799acb77253056e700e2d538f9077207ac24
|
4
|
+
data.tar.gz: 5b1174316fe2184007723d8957dda6f9b3c369f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 031baa4597129eab4d67915994f1f9f44777c28de123f8649e303a57ad370b5262cbb6297020ed39bbd1f3f5ccdc55e51c13a9da03c1ac014bd6c269556a50fb
|
7
|
+
data.tar.gz: 0057f36eba1d2dc4132a5897a329975585640ca08951dd02c60fbf72920ddb1d441b04bd7fc93c90275b3301cba0813a88a0f1808cf3efae65736d9d42d0ded8
|
data/lib/gameon/base.rb
CHANGED
@@ -45,36 +45,35 @@ module GameOn
|
|
45
45
|
#module Env
|
46
46
|
class Env
|
47
47
|
extend Mushin::Env
|
48
|
-
|
48
|
+
|
49
49
|
class << self
|
50
|
-
|
51
|
-
#attr_accessor :ds
|
52
|
-
#@ds = 'GameOn::Persistence::DS'
|
50
|
+
attr_accessor :id
|
53
51
|
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
def get id
|
53
|
+
GameOn::Persistence::DS.load id
|
54
|
+
end
|
57
55
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
56
|
+
def set id=nil, &block
|
57
|
+
@id = id
|
58
|
+
def on domain_context, &block
|
59
|
+
@domain_context = domain_context
|
60
|
+
@activities = []
|
61
|
+
def activity statment
|
62
|
+
@activities += [statment]
|
63
|
+
end
|
64
|
+
instance_eval(&block)
|
65
65
|
end
|
66
66
|
instance_eval(&block)
|
67
|
-
end
|
68
|
-
instance_eval(&block)
|
69
67
|
|
70
|
-
|
68
|
+
Dir["./gameon/*"].each {|file| load file }
|
71
69
|
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
|
71
|
+
@activities.each do |activity|
|
72
|
+
GameOn::Engine.run @domain_context, activity
|
73
|
+
end
|
74
|
+
return get @id
|
75
75
|
end
|
76
|
-
|
76
|
+
#alias_method :[], :set
|
77
77
|
end
|
78
78
|
end
|
79
|
-
end
|
80
79
|
end
|