Class: AriFetch::AriReadFile
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AriFetch::AriReadFile
- Defined in:
- lib/ari_fetch/ari_read_file.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#vehicles ⇒ Object
writeonly
Sets the attribute vehicles.
Instance Method Summary collapse
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
9 10 11 |
# File 'lib/ari_fetch/ari_read_file.rb', line 9 def content @content end |
#vehicles=(value) ⇒ Object
Sets the attribute vehicles
9 10 11 |
# File 'lib/ari_fetch/ari_read_file.rb', line 9 def vehicles=(value) @vehicles = value end |
Instance Method Details
#fetch_data(ftp_instance, include_cancel) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ari_fetch/ari_read_file.rb', line 11 def fetch_data(ftp_instance, include_cancel) ftp_instance.get(name) @content = parse!(File.open(name, "r")) FileUtils.rm name filter_cancel_vehicles! unless include_cancel result.tap { data_reading_done! } end |