gameon 0.0.0.pre120 → 0.0.0.pre121

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 +23 -32
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 740a23b51138c8c011218239cdd37233393a8ded
4
- data.tar.gz: a02569c0c9964ce0aa1bbb9bb770745ea4d70cc0
3
+ metadata.gz: 8c8cbfa529854dba5e2ca1fc3c61a8226e7abc6a
4
+ data.tar.gz: 0ffcc956afe5dc07f6e4a008f68a14a18d24bbd1
5
5
  SHA512:
6
- metadata.gz: bb7b602580161e431660e438fc964be954a9b89d9d36a89b5f7d36a0b8dac30647664adaeaba27d31143f0eb0eae09919713be1d619054ad50d432ee4423da41
7
- data.tar.gz: 5a74a3c281cef10aaee306ebb07da72408b2faf10a746c53e63a20878d1ffb912d24944d32c445f63c4117186fa985f9fe16e2e62d96792340946b825a0f63f8
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
- GameOn::Engine.setup [Object.const_get('GameOn::Persistence::DS')]
82
- @activities.uniq.each do |current_activity_title|
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
- class << self
94
- def set id, &block
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 get id
100
- e = Env.new
101
- e.get id
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
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.pre120
4
+ version: 0.0.0.pre121
5
5
  platform: ruby
6
6
  authors:
7
7
  - theotherstupidguy