Class: MyLocalPutio::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/my-local-putio/fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cliObject (readonly)

Returns the value of attribute cli.



3
4
5
# File 'lib/my-local-putio/fetcher.rb', line 3

def cli
  @cli
end

#configurationObject (readonly)

Returns the value of attribute configuration.



3
4
5
# File 'lib/my-local-putio/fetcher.rb', line 3

def configuration
  @configuration
end

#disk_managerObject (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

#downloaderObject (readonly)

Returns the value of attribute downloader.



3
4
5
# File 'lib/my-local-putio/fetcher.rb', line 3

def downloader
  @downloader
end

#loggerObject (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