gameon 0.0.0.pre120 → 0.0.0.pre121
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 +23 -32
- 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: 8c8cbfa529854dba5e2ca1fc3c61a8226e7abc6a
|
4
|
+
data.tar.gz: 0ffcc956afe5dc07f6e4a008f68a14a18d24bbd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e4ff2c135bd52f770d8e5e9e3f65e5062d8328034619c8cfeb43ac2a787c2bbae3692ba945a523afb11e8c19a7825f54716be6ee4d003890840f6dea63b039a
|
7
|
+
data.tar.gz: f62fcbb3fcf38abd57a9cd819a69e9048313b1e0917f72cf5417222217ffa0ef66e52d1c143bdd79298974513c12d4b4dd06c6d281cdf2b96e74f8f1108d9698
|
data/lib/gameon/base.rb
CHANGED
@@ -62,43 +62,34 @@ module GameOn
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
end
|
65
|
-
|
66
|
-
class Env
|
65
|
+
class Env
|
67
66
|
extend Mushin::Env
|
68
|
-
attr_accessor :id
|
69
|
-
def set id, &block
|
70
|
-
@id = id.to_s + 'gameon'
|
71
|
-
def context current_context_title, &block
|
72
|
-
@current_context_title = current_context_title
|
73
|
-
@activities = []
|
74
|
-
def activity current_activity_title
|
75
|
-
@activities << current_activity_title
|
76
|
-
end
|
77
|
-
instance_eval(&block)
|
78
|
-
end
|
79
|
-
instance_eval(&block)
|
80
67
|
|
81
|
-
|
82
|
-
|
83
|
-
GameOn::Engine.run @current_context_title, current_activity_title
|
84
|
-
end
|
85
|
-
#@activities = [] # reset the activities
|
86
|
-
return GameOn::Persistence::DS.load @id
|
87
|
-
end
|
88
|
-
|
89
|
-
def get id
|
90
|
-
GameOn::Persistence::DS.load id.to_s + 'gameon' #TODO some app key based encryption method
|
91
|
-
end
|
68
|
+
class << self
|
69
|
+
attr_accessor :id
|
92
70
|
|
93
|
-
|
94
|
-
|
95
|
-
e = Env.new
|
96
|
-
e.set id, &block
|
71
|
+
def get id
|
72
|
+
GameOn::Persistence::DS.load id.to_s + 'gameon' #TODO some app key based encryption method
|
97
73
|
end
|
98
74
|
|
99
|
-
def
|
100
|
-
|
101
|
-
|
75
|
+
def set id, &block
|
76
|
+
@id = id.to_s + 'gameon'
|
77
|
+
def context current_context_title, &block
|
78
|
+
@current_context_title = current_context_title
|
79
|
+
@activities = []
|
80
|
+
def activity current_activity_title
|
81
|
+
@activities << current_activity_title
|
82
|
+
end
|
83
|
+
instance_eval(&block)
|
84
|
+
end
|
85
|
+
instance_eval(&block)
|
86
|
+
|
87
|
+
GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
|
88
|
+
@activities.uniq.each do |current_activity_title|
|
89
|
+
GameOn::Engine.run @current_context_title, current_activity_title
|
90
|
+
end
|
91
|
+
@activities = [] # reset the activities
|
92
|
+
return GameOn::Persistence::DS.load @id
|
102
93
|
end
|
103
94
|
end
|
104
95
|
end
|