Class: Txgh::ResourceDownloader
- Inherits:
-
Object
- Object
- Txgh::ResourceDownloader
- Includes:
- Enumerable
- Defined in:
- lib/txgh/resource_downloader.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(project, repo, branch, options = {}) ⇒ ResourceDownloader
constructor
A new instance of ResourceDownloader.
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, = {}) @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 = [:languages] @resources = [:resources] end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
7 8 9 |
# File 'lib/txgh/resource_downloader.rb', line 7 def branch @branch end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
7 8 9 |
# File 'lib/txgh/resource_downloader.rb', line 7 def project @project end |
#repo ⇒ Object (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 |