Class: Ressbo::Store
- Inherits:
-
Object
- Object
- Ressbo::Store
- Defined in:
- lib/ressbo/store.rb
Instance Attribute Summary collapse
-
#fresh ⇒ Object
readonly
Returns the value of attribute fresh.
Instance Method Summary collapse
-
#initialize(path = nil) ⇒ Store
constructor
Create a new Ressbo store, creating one if necessary.
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.(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
#fresh ⇒ Object (readonly)
Returns the value of attribute fresh.
31 32 33 |
# File 'lib/ressbo/store.rb', line 31 def fresh @fresh end |