Class: Txgh::ResourceDownloader

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/txgh/resource_downloader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, repo, branch, options = {}) ⇒ ResourceDownloader

Returns a new instance of ResourceDownloader.



9
10
11
12
13
14
15
16
17
18
# File 'lib/txgh/resource_downloader.rb', line 9

def initialize(project, repo, branch, options = {})
  @project = project
  @repo = repo
  @branch = branch

  # Provides an override list of languages. If not present, the downloader
  # will make an API call to fetch the list of languages for the project.
  @languages = options[:languages]
  @resources = options[:resources]
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



7
8
9
# File 'lib/txgh/resource_downloader.rb', line 7

def branch
  @branch
end

#projectObject (readonly)

Returns the value of attribute project.



7
8
9
# File 'lib/txgh/resource_downloader.rb', line 7

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/txgh/resource_downloader.rb', line 7

def repo
  @repo
end

Instance Method Details

#each(&block) ⇒ Object



20
21
22
# File 'lib/txgh/resource_downloader.rb', line 20

def each(&block)
  enum.each(&block)
end