Module: Aqueduct::Repository
- Included in:
- Aqueduct::Repositories::Developer
- Defined in:
- lib/aqueduct/repository.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#count_files(file_locators, file_type) ⇒ Object
Returns a list of urls to download files.
- #file_server_available? ⇒ Boolean
-
#get_file(file_locator, file_type) ⇒ Object
Only For Local repositories.
- #has_repository? ⇒ Boolean
- #initialize(source, current_user) ⇒ Object
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/aqueduct/repository.rb', line 6 def self.included(base) Aqueduct.repositories << base end |
Instance Method Details
#count_files(file_locators, file_type) ⇒ Object
Returns a list of urls to download files
16 17 18 |
# File 'lib/aqueduct/repository.rb', line 16 def count_files(file_locators, file_type) { result: 0, error: "Unknown Repository: #{@source.repository}", file_paths: [], urls: [] } end |
#file_server_available? ⇒ Boolean
29 30 31 |
# File 'lib/aqueduct/repository.rb', line 29 def file_server_available? { result: false, error: "Unknown Repository: #{@source.repository}" } end |
#get_file(file_locator, file_type) ⇒ Object
Only For Local repositories.
21 22 23 |
# File 'lib/aqueduct/repository.rb', line 21 def get_file(file_locator, file_type) { file_path: '', error: "Unknown Repository: #{@source.repository}" } end |
#has_repository? ⇒ Boolean
25 26 27 |
# File 'lib/aqueduct/repository.rb', line 25 def has_repository? { result: false, error: "Unknown Repository: #{@source.repository}" } end |
#initialize(source, current_user) ⇒ Object
10 11 12 13 |
# File 'lib/aqueduct/repository.rb', line 10 def initialize(source, current_user) @source = source @current_user = current_user end |