Class: MyLocalPutio::Fetcher
- Inherits:
-
Object
- Object
- MyLocalPutio::Fetcher
- Defined in:
- lib/my-local-putio/fetcher.rb
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#disk_manager ⇒ Object
readonly
Returns the value of attribute disk_manager.
-
#downloader ⇒ Object
readonly
Returns the value of attribute downloader.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ Fetcher
constructor
A new instance of Fetcher.
- #run! ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Fetcher
Returns a new instance of Fetcher.
5 6 7 8 9 10 11 |
# File 'lib/my-local-putio/fetcher.rb', line 5 def initialize(configuration) @configuration = configuration @logger = configuration.logger @disk_manager = configuration.disk_manager @cli = PutioCli.new(@configuration) @downloader = Downloader.new(@configuration) end |
Instance Attribute Details
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
3 4 5 |
# File 'lib/my-local-putio/fetcher.rb', line 3 def cli @cli end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
3 4 5 |
# File 'lib/my-local-putio/fetcher.rb', line 3 def configuration @configuration end |
#disk_manager ⇒ Object (readonly)
Returns the value of attribute disk_manager.
3 4 5 |
# File 'lib/my-local-putio/fetcher.rb', line 3 def disk_manager @disk_manager end |
#downloader ⇒ Object (readonly)
Returns the value of attribute downloader.
3 4 5 |
# File 'lib/my-local-putio/fetcher.rb', line 3 def downloader @downloader end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
3 4 5 |
# File 'lib/my-local-putio/fetcher.rb', line 3 def logger @logger end |
Instance Method Details
#run! ⇒ Object
13 14 15 |
# File 'lib/my-local-putio/fetcher.rb', line 13 def run! fetch_files end |