Class: Rdayone::Journal

Inherits:
Object
  • Object
show all
Defined in:
lib/rdayone/journal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path, finder = Rdayone::Finder.new(file_path)) ⇒ Journal

Returns a new instance of Journal.



5
6
7
8
9
# File 'lib/rdayone/journal.rb', line 5

def initialize(file_path, finder = Rdayone::Finder.new(file_path))
  @file_path = file_path
  @finder = finder
  @entries = finder.find_entries
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



3
4
5
# File 'lib/rdayone/journal.rb', line 3

def entries
  @entries
end

#file_pathObject (readonly)

Returns the value of attribute file_path.



3
4
5
# File 'lib/rdayone/journal.rb', line 3

def file_path
  @file_path
end

#finderObject (readonly)

Returns the value of attribute finder.



3
4
5
# File 'lib/rdayone/journal.rb', line 3

def finder
  @finder
end