fake_go_up 0.1.3 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fake_go_up.rb +1 -0
- data/lib/fake_go_up/item.rb +26 -0
- data/lib/fake_go_up/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0de6d5060c4acaaab92fc40d85d5ab8759f3344
|
4
|
+
data.tar.gz: 89ef88ceadbd74001589cce7c50335967e6aa50f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d05d52cbfb65624269c33bfbfb5c58566c86a833f97da14391418f63cc0c404e540f6bd424a1819d63c36b24c29c3ac88428a00c41cc3dfb68da2ef6c748e968
|
7
|
+
data.tar.gz: 9464ee40a1b5d6152c49d5cfbb28f08584f5513e05c1ca78e021052cef1de480fc8eaf634efd2d1a9926b3a819c4a1d6a83490c8b4c8669269c87ee9c8435c47
|
data/lib/fake_go_up.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
module FakeGoUp
|
2
|
+
class Item
|
3
|
+
attr_accessor :count
|
4
|
+
|
5
|
+
@@data = {}
|
6
|
+
|
7
|
+
def initialize(id = 1)
|
8
|
+
@id = id
|
9
|
+
@count = 0
|
10
|
+
end
|
11
|
+
|
12
|
+
def id
|
13
|
+
@id
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.find_by_id(id)
|
17
|
+
@@data[id.to_i]
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.create(id)
|
21
|
+
instance = new(id)
|
22
|
+
@@data[id] = instance
|
23
|
+
instance
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/fake_go_up/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake_go_up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xuxiangyang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pid_lock
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- bin/setup
|
127
127
|
- fake_go_up.gemspec
|
128
128
|
- lib/fake_go_up.rb
|
129
|
+
- lib/fake_go_up/item.rb
|
129
130
|
- lib/fake_go_up/task.rb
|
130
131
|
- lib/fake_go_up/version.rb
|
131
132
|
homepage: https://github.com/xuxiangyang/fake_go_up
|