Class: Ressbo::Store

Inherits:
Object
  • Object
show all
Defined in:
lib/ressbo/store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = nil) ⇒ Store

Create a new Ressbo store, creating one if necessary



35
36
37
38
39
40
41
# File 'lib/ressbo/store.rb', line 35

def initialize (path=nil)
  @path = File.expand_path(path || Constants::DEFAULT_DB_PATH)
  File.exist?(@path) ? check : create
  connect
  load_models
  Sink.new.load_from_address_book if @fresh
end

Instance Attribute Details

#freshObject (readonly)

Returns the value of attribute fresh.



31
32
33
# File 'lib/ressbo/store.rb', line 31

def fresh
  @fresh
end