diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-06 15:43:46 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-06 15:43:46 -0800 |
commit | 88fa90b7f039f62962cc8d11031446412b951be2 (patch) | |
tree | 04c2d961f6e3e41b069f074d7b93e1d91d8d716e /lib/metropolis/hash.rb | |
parent | 74ca34be2d54809822447ff185d88d83fcd566ae (diff) | |
download | metropolis-88fa90b7f039f62962cc8d11031446412b951be2.tar.gz |
allow easier, single-file options for TC and TDB
Most (other) users only need a single file, even though my primary use of this is for multiple files.
Diffstat (limited to 'lib/metropolis/hash.rb')
-rw-r--r-- | lib/metropolis/hash.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/metropolis/hash.rb b/lib/metropolis/hash.rb index fb4d272..d5c70cb 100644 --- a/lib/metropolis/hash.rb +++ b/lib/metropolis/hash.rb @@ -8,7 +8,7 @@ module Metropolis::Hash def setup(opts) super - if @path = opts[:path] + if @path begin @db = Marshal.load(File.open(@path, "rb") { |fp| fp.read }) Hash === @db or raise ArgumentError, "#@path is not a marshaled Hash" |