Class: Backlog::Entry
- Inherits:
-
Object
- Object
- Backlog::Entry
- Defined in:
- lib/backlog/file.rb,
lib/backlog/entry.rb
Instance Method Summary collapse
- #create ⇒ Object
- #exists ⇒ Object
-
#initialize(date) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(date) ⇒ Entry
Returns a new instance of Entry.
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/backlog/entry.rb', line 3 def initialize(date) @date = date @path = date.path if not File.exists?(date.path) @exists = nil else @exists = true end end |
Instance Method Details
#create ⇒ Object
18 19 20 21 22 23 |
# File 'lib/backlog/entry.rb', line 18 def create File.open(@path, "w") do |f| f.write content end end |
#exists ⇒ Object
14 15 16 |
# File 'lib/backlog/entry.rb', line 14 def exists return @exists end |