Module: Resync::Client::Mixins::Downloadable
- Includes:
- ClientDelegator
- Included in:
- ZippedResource, Link, Resource
- Defined in:
- lib/resync/client/mixins/downloadable.rb
Overview
A downloadable resource or link.
Instance Attribute Summary
Attributes included from ClientDelegator
Instance Method Summary collapse
-
#download_to_file(path) ⇒ Object
Delegates to Resync::Client#download_to_file to download the contents of
:urito the specified path. -
#download_to_temp_file ⇒ Object
Delegates to Resync::Client#download_to_temp_file to download the contents of
:urito a file. -
#get ⇒ Object
Delegates to Resync::Client#get to get the contents of this
:uri. -
#get_and_parse ⇒ Object
Delegates to Resync::Client#get_and_parse to get the contents of
:urias a ResourceSync document.
Methods included from ClientDelegator
Instance Method Details
#download_to_file(path) ⇒ Object
Delegates to Resync::Client#download_to_file to download the
contents of :uri to the specified path.
31 32 33 |
# File 'lib/resync/client/mixins/downloadable.rb', line 31 def download_to_file(path) client.download_to_file(uri: uri, path: path) end |
#download_to_temp_file ⇒ Object
Delegates to Resync::Client#download_to_temp_file to download the
contents of :uri to a file.
24 25 26 |
# File 'lib/resync/client/mixins/downloadable.rb', line 24 def download_to_temp_file # rubocop:disable Style/AccessorMethodName client.download_to_temp_file(uri) end |
#get ⇒ Object
Delegates to Resync::Client#get to get the contents of this :uri
18 19 20 |
# File 'lib/resync/client/mixins/downloadable.rb', line 18 def get # rubocop:disable Style/AccessorMethodName client.get(uri) end |
#get_and_parse ⇒ Object
Delegates to Resync::Client#get_and_parse to get the contents of
:uri as a ResourceSync document
13 14 15 |
# File 'lib/resync/client/mixins/downloadable.rb', line 13 def get_and_parse # rubocop:disable Style/AccessorMethodName client.get_and_parse(uri) end |