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.



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

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.



5
6
7
# File 'lib/txgh/resource_downloader.rb', line 5

def branch
  @branch
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'lib/txgh/resource_downloader.rb', line 5

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo.



5
6
7
# File 'lib/txgh/resource_downloader.rb', line 5

def repo
  @repo
end

Instance Method Details

#each(&block) ⇒ Object



18
19
20
# File 'lib/txgh/resource_downloader.rb', line 18

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