gameon-points 0.0.0.pre8 → 0.0.0.pre9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gameon-points/base.rb +14 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0af60893226f91a26561517cb01d356bf0eb0a46
|
4
|
+
data.tar.gz: 97c39b936a96d140ff5cd121b4991b97b6cf7f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b0be0459797acf91b84f24c7cc17ae6ceb45944ca15f5ff7fdbfeca80d6c38da1309fc6e09ae0df2ed68fe082fa31a61860eceee180d24e39ee2aa49e0045a3
|
7
|
+
data.tar.gz: 5d0a8fd9285e20eb6443a3000d45a27a5af0581e4432570c01618408e257cbb0b9c7c360053799113c9311b3e01fe85db32927dbbcd2aea290b88024e6de0d74
|
data/lib/gameon-points/base.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
GameOn::Env.register do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
class << self
|
3
|
+
attr_accessor :points
|
4
|
+
def add_points value
|
5
|
+
if !@points.nil?
|
6
|
+
@points = @points + value
|
7
|
+
else
|
8
|
+
@points = 0
|
9
|
+
end
|
8
10
|
end
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
def remove_points value
|
12
|
+
if !@points.nil?
|
13
|
+
@points = @points - value
|
14
|
+
else
|
15
|
+
@points = 0
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gameon-points
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.pre9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- theotherstupidguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gameon
|