Class: Moodwall::Repository
- Inherits:
-
Object
- Object
- Moodwall::Repository
- Defined in:
- lib/moodwall/repository.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(store = PStore.new("database.pstore")) ⇒ Repository
constructor
A new instance of Repository.
Constructor Details
#initialize(store = PStore.new("database.pstore")) ⇒ Repository
Returns a new instance of Repository.
7 8 9 |
# File 'lib/moodwall/repository.rb', line 7 def initialize(store = PStore.new("database.pstore")) @store = store end |
Instance Attribute Details
#store ⇒ Object (readonly)
Returns the value of attribute store.
5 6 7 |
# File 'lib/moodwall/repository.rb', line 5 def store @store end |
Class Method Details
.reset ⇒ Object
15 16 17 18 19 20 |
# File 'lib/moodwall/repository.rb', line 15 def self.reset store = self.store store.transaction do store.roots.each { |r| store.delete r } end end |
.store ⇒ Object
11 12 13 |
# File 'lib/moodwall/repository.rb', line 11 def self.store new.store end |