Module: Resync::Downloadable
Overview
Adds get, get_raw, and get_file methods, delegating
to the injected client.
Instance Method Summary collapse
-
#download_to_file(path) ⇒ Object
Delegates to Client#download_to_file to download the contents of
:urito the specified path. -
#download_to_temp_file ⇒ Object
Delegates to Client#download_to_temp_file to download the contents of
:urito a file. -
#get ⇒ Object
Delegates to Client#get to get the contents of this
:uri. -
#get_and_parse ⇒ Object
Delegates to Client#get_and_parse to get the contents of
:urias a ResourceSync document.
Instance Method Details
#download_to_file(path) ⇒ Object
Delegates to Client#download_to_file to download the
contents of :uri to the specified path.
30 31 32 |
# File 'lib/resync/client/downloadable.rb', line 30 def download_to_file(path) client.download_to_file(uri: uri, path: path) end |
#download_to_temp_file ⇒ Object
Delegates to Client#download_to_temp_file to download the
contents of :uri to a file.
23 24 25 |
# File 'lib/resync/client/downloadable.rb', line 23 def download_to_temp_file # rubocop:disable Style/AccessorMethodName client.download_to_temp_file(uri) end |
#get ⇒ Object
Delegates to Client#get to get the contents of this :uri
17 18 19 |
# File 'lib/resync/client/downloadable.rb', line 17 def get # rubocop:disable Style/AccessorMethodName client.get(uri) end |
#get_and_parse ⇒ Object
Delegates to Client#get_and_parse to get the contents of
:uri as a ResourceSync document
12 13 14 |
# File 'lib/resync/client/downloadable.rb', line 12 def get_and_parse # rubocop:disable Style/AccessorMethodName client.get_and_parse(uri) end |