Class: DayOneKindle::DataStore
- Defined in:
- lib/dayone-kindle/data_store.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(entries, tags = []) ⇒ DataStore
constructor
A new instance of DataStore.
- #save! ⇒ Object
Constructor Details
#initialize(entries, tags = []) ⇒ DataStore
Returns a new instance of DataStore.
5 6 7 8 |
# File 'lib/dayone-kindle/data_store.rb', line 5 def initialize(entries, = []) @entries = entries @tags = end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
3 4 5 |
# File 'lib/dayone-kindle/data_store.rb', line 3 def entries @entries end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
3 4 5 |
# File 'lib/dayone-kindle/data_store.rb', line 3 def @tags end |
Instance Method Details
#save! ⇒ Object
10 11 12 |
# File 'lib/dayone-kindle/data_store.rb', line 10 def save! entries.map { |entry| save_entry!(entry) } end |