mnbi / textrepo

A repository to store a note text with a timestamp
MIT License
0 stars 0 forks source link

`FileSystemRepository#entries` returns wrong value #25

Closed mnbi closed 4 years ago

mnbi commented 4 years ago

FileSystemRepository#entries returns an array. Currently, the array contains strings those are represents Timestamps. Should they be Timestamp objects?

The original concept of this method is intended to be written as:

repo = Textrepo.init(conf)
notes = repo.entries("20201027")
notes.each { |n|
  repo.delete(n)
}

If entries returns an array of string, user code must convert it to Timestamp object to use it with other Repository methods, since all other Repository methods accepts a Timestamp object instead of a string.