Class: Iconly::Project::Downloader

Inherits:
Object
  • Object
show all
Defined in:
app/models/iconly/project/downloader.rb

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ Downloader

Returns a new instance of Downloader.



4
5
6
# File 'app/models/iconly/project/downloader.rb', line 4

def initialize(project)
  @project = project
end

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
# File 'app/models/iconly/project/downloader.rb', line 8

def call
  return unless @project.icons.any?
  generate
  zip_file_path
rescue => e
  Rails.logger.error e
  nil
end