Class: Uur::EntriesFileReader
- Inherits:
-
Object
- Object
- Uur::EntriesFileReader
- Defined in:
- lib/uur/entries_file_reader.rb
Constant Summary collapse
- CannotReadException =
Class.new(Exception)
Instance Method Summary collapse
-
#initialize(entries_file_path) ⇒ EntriesFileReader
constructor
A new instance of EntriesFileReader.
- #read ⇒ Object
Constructor Details
#initialize(entries_file_path) ⇒ EntriesFileReader
Returns a new instance of EntriesFileReader.
6 7 8 |
# File 'lib/uur/entries_file_reader.rb', line 6 def initialize(entries_file_path) @entries_file_path = entries_file_path end |
Instance Method Details
#read ⇒ Object
10 11 12 13 14 |
# File 'lib/uur/entries_file_reader.rb', line 10 def read File.read(@entries_file_path) rescue raise CannotReadException, "Cannot read the entries file: #{@entries_file_path}" end |