gameon 0.0.0.pre121 → 0.0.0.pre122

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gameon/base.rb +46 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c8cbfa529854dba5e2ca1fc3c61a8226e7abc6a
4
- data.tar.gz: 0ffcc956afe5dc07f6e4a008f68a14a18d24bbd1
3
+ metadata.gz: 66cb8dce56b0e3a2bb4e7ca438b6e0b5509a6550
4
+ data.tar.gz: 14938201686c55821f1404aab2efaa32f1815157
5
5
  SHA512:
6
- metadata.gz: 2e4ff2c135bd52f770d8e5e9e3f65e5062d8328034619c8cfeb43ac2a787c2bbae3692ba945a523afb11e8c19a7825f54716be6ee4d003890840f6dea63b039a
7
- data.tar.gz: f62fcbb3fcf38abd57a9cd819a69e9048313b1e0917f72cf5417222217ffa0ef66e52d1c143bdd79298974513c12d4b4dd06c6d281cdf2b96e74f8f1108d9698
6
+ metadata.gz: 3e13e2b37ed8bb1a18164dff06f5320a0c51e9c8479381b30fd6e72b5b4b3a3e10c14d0f739aaddb9da312892be19bfba878c641e87fa86fa7b8735fb0607e5e
7
+ data.tar.gz: f7adc643466a216a2b76b46939732004c621515505d0095d7077a3dce22212fb526aa6f52774e266dda7c37d1eba59f958aee62523c0814eef31f6c2926beeec
@@ -62,6 +62,7 @@ module GameOn
62
62
  end
63
63
  end
64
64
  end
65
+ =begin
65
66
  class Env
66
67
  extend Mushin::Env
67
68
 
@@ -93,4 +94,49 @@ module GameOn
93
94
  end
94
95
  end
95
96
  end
97
+ =end
98
+
99
+ class Env
100
+ extend Mushin::Env
101
+
102
+ attr_accessor :id
103
+ def set id, &block
104
+ @id = id.to_s + 'gameon'
105
+ def context current_context_title, &block
106
+ @current_context_title = current_context_title
107
+ @activities = []
108
+ def activity current_activity_title
109
+ @activities << current_activity_title
110
+ end
111
+ instance_eval(&block)
112
+ end
113
+ instance_eval(&block)
114
+
115
+ #GameOn::Env.id = @id
116
+ GameOn::Engine.setup [[Object.const_get('GameOn::Persistence::DS'), @id]]
117
+ @activities.uniq.each do |current_activity_title|
118
+ GameOn::Engine.run @current_context_title, current_activity_title
119
+ end
120
+ #@activities = [] # reset the activities
121
+ return GameOn::Persistence::DS.load @id
122
+ end
123
+
124
+ def get id
125
+ GameOn::Persistence::DS.load id.to_s + 'gameon' #TODO some app key based encryption method
126
+ end
127
+
128
+ class << self
129
+ def set id, &block
130
+ e = Env.new
131
+ e.set id, &block
132
+ end
133
+
134
+ def get id
135
+ e = Env.new
136
+ e.get id
137
+ end
138
+ end
139
+ end
140
+ #=end
141
+
96
142
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gameon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre121
4
+ version: 0.0.0.pre122
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy