Class: Crusoe::EntryFileName
- Inherits:
-
Object
- Object
- Crusoe::EntryFileName
- Defined in:
- lib/crusoe/entry_file_name.rb
Constant Summary collapse
- DATE_SEPARATOR =
"-".freeze
Instance Attribute Summary collapse
-
#entries_directory ⇒ Object
readonly
Returns the value of attribute entries_directory.
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Instance Method Summary collapse
-
#initialize(entry, entries_directory) ⇒ EntryFileName
constructor
A new instance of EntryFileName.
- #to_file_path ⇒ Object (also: #to_s)
Constructor Details
#initialize(entry, entries_directory) ⇒ EntryFileName
Returns a new instance of EntryFileName.
8 9 10 11 |
# File 'lib/crusoe/entry_file_name.rb', line 8 def initialize(entry, entries_directory) @entry = entry @entries_directory = entries_directory end |
Instance Attribute Details
#entries_directory ⇒ Object (readonly)
Returns the value of attribute entries_directory.
4 5 6 |
# File 'lib/crusoe/entry_file_name.rb', line 4 def entries_directory @entries_directory end |
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
3 4 5 |
# File 'lib/crusoe/entry_file_name.rb', line 3 def entry @entry end |
Instance Method Details
#to_file_path ⇒ Object Also known as: to_s
13 14 15 16 17 |
# File 'lib/crusoe/entry_file_name.rb', line 13 def to_file_path File.join(entries_directory, month_directory_name, file_name) + file_format end |