key-db 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/hashkeydb.rb +3 -2
  2. metadata +3 -2
@@ -1,6 +1,7 @@
1
1
  class HashKeyDB
2
2
  def initialize filename
3
- @filename = "#{filename}.db"
3
+ @filename = filename.split(".")
4
+ @filename = "#{@filename[0]}.db"
4
5
  unless Dir.entries('.').detect {|f| f.match "#{@filename}"}
5
6
  @db_file = File.new(@filename, "w")
6
7
  @db_file.close
@@ -13,7 +14,7 @@ class HashKeyDB
13
14
  @db_file.write("\n")
14
15
  @db_file.close
15
16
  end
16
- def recall_key keyname
17
+ def get_key keyname
17
18
  File.open(@filename, "r").each_line do |line|
18
19
  line = Marshal.load(line)
19
20
  if line[keyname]
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.2.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,8 @@ 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, all bugs fixed, marshaling included
14
+ description: A database acessible via keys, all bugs fixed, marshaling included. Renamed
15
+ recall_key method to get_key
15
16
  email: slmnwise@gmail.com
16
17
  executables: []
17
18
  extensions: []