Class: Gitlab::GlRepository
- Inherits:
-
Object
- Object
- Gitlab::GlRepository
- Includes:
- Singleton
- Defined in:
- lib/gitlab/gl_repository.rb
Constant Summary collapse
- PROJECT =
Gitlab::Repositories::ProjectRepository.instance
- WIKI =
Gitlab::Repositories::WikiRepository.instance
- SNIPPET =
Gitlab::Repositories::SnippetRepository.instance
- DESIGN =
::Gitlab::Repositories::DesignManagementRepository.instance
- TYPES =
{ PROJECT.type_id => PROJECT, WIKI.type_id => WIKI, SNIPPET.type_id => SNIPPET, DESIGN.type_id => DESIGN }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_type ⇒ Object
32 33 34 |
# File 'lib/gitlab/gl_repository.rb', line 32 def self.default_type PROJECT end |
.parse(gl_repository) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/gitlab/gl_repository.rb', line 23 def self.parse(gl_repository) identifier = ::Gitlab::Repositories::Identifier.parse(gl_repository) repo_type = identifier.repo_type container = identifier.container [container, repo_type.project_for(container), repo_type] end |
.types ⇒ Object
19 20 21 |
# File 'lib/gitlab/gl_repository.rb', line 19 def self.types instance.types end |
Instance Method Details
#types ⇒ Object
36 37 38 |
# File 'lib/gitlab/gl_repository.rb', line 36 def types TYPES end |