Class: Sprig::Reap::FileAttribute::LocalFile
- Inherits:
-
Struct
- Object
- Struct
- Sprig::Reap::FileAttribute::LocalFile
- Defined in:
- lib/sprig/reap/file_attribute.rb
Instance Method Summary collapse
Instance Method Details
#file ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/sprig/reap/file_attribute.rb', line 50 def file @file ||= File.open(unique_location, 'w', :encoding => encoding).tap do |file| io.rewind file.write(io.read) io.close end end |
#io ⇒ Object
58 59 60 |
# File 'lib/sprig/reap/file_attribute.rb', line 58 def io @io ||= open uri end |
#sprig_location ⇒ Object
62 63 64 |
# File 'lib/sprig/reap/file_attribute.rb', line 62 def sprig_location "<%= sprig_file('#{File.basename(file.path)}') %>" end |