key-db 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/hashkeydb.rb +8 -3
- metadata +2 -2
data/lib/hashkeydb.rb
CHANGED
@@ -19,10 +19,15 @@ class HashKeyDB
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
22
|
-
def
|
22
|
+
def access type
|
23
23
|
File.open(@filename).each_line do |line|
|
24
|
-
@
|
25
|
-
|
24
|
+
@keys_and_vals = line.split('/')
|
25
|
+
if type == "keys"
|
26
|
+
index = 0
|
27
|
+
elsif type == "vals"
|
28
|
+
index = 1
|
29
|
+
end
|
30
|
+
puts @keys_and_vals[index]
|
26
31
|
end
|
27
32
|
end
|
28
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: key-db
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ bindir: bin
|
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: A database acessible via keys, now with a '
|
14
|
+
description: A database acessible via keys, now with a 'access' function
|
15
15
|
email: slmnwise@gmail.com
|
16
16
|
executables: []
|
17
17
|
extensions: []
|