Class: Imgfetcha::FileReader
- Inherits:
-
Object
- Object
- Imgfetcha::FileReader
- Defined in:
- lib/imgfetcha/file_reader.rb,
lib/imgfetcha/errors/no_urls_found_error.rb,
lib/imgfetcha/errors/input_file_not_specified_error.rb
Defined Under Namespace
Classes: InputFileNotSpecifiedError, NoUrlsFoundError
Instance Attribute Summary collapse
-
#input_file ⇒ Object
readonly
Returns the value of attribute input_file.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(options) ⇒ FileReader
constructor
A new instance of FileReader.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ FileReader
Returns a new instance of FileReader.
5 6 7 8 |
# File 'lib/imgfetcha/file_reader.rb', line 5 def initialize() @input_file = [:input_file] @verbose = [:verbose] end |
Instance Attribute Details
#input_file ⇒ Object (readonly)
Returns the value of attribute input_file.
3 4 5 |
# File 'lib/imgfetcha/file_reader.rb', line 3 def input_file @input_file end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
3 4 5 |
# File 'lib/imgfetcha/file_reader.rb', line 3 def result @result end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 |
# File 'lib/imgfetcha/file_reader.rb', line 10 def run read_file filter_urls report_results if @verbose @result end |