Method: Cript::EHash#initialize

Defined in:
lib/cript/ehash.rb

#initialize(file, opts = {}) ⇒ EHash

Returns a new instance of EHash.



13
14
15
16
17
18
19
20
# File 'lib/cript/ehash.rb', line 13

def initialize(file, opts = {})
  @store = Store.new(file, opts)
  @store.transaction do
    unless @store[KEY].is_a?(Hash)
      @store[KEY] = {}
    end
  end
end