Class: Gitlab::Ci::ProjectConfig::Source
- Inherits:
-
Object
- Object
- Gitlab::Ci::ProjectConfig::Source
show all
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/project_config/source.rb
Instance Method Summary
collapse
Constructor Details
#initialize(project, sha, custom_content, pipeline_source, pipeline_source_bridge) ⇒ Source
Returns a new instance of Source.
9
10
11
12
13
14
15
|
# File 'lib/gitlab/ci/project_config/source.rb', line 9
def initialize(project, sha, custom_content, pipeline_source, pipeline_source_bridge)
@project = project
@sha = sha
@custom_content = custom_content
@pipeline_source = pipeline_source
@pipeline_source_bridge = pipeline_source_bridge
end
|
Instance Method Details
#content ⇒ Object
23
24
25
|
# File 'lib/gitlab/ci/project_config/source.rb', line 23
def content
raise NotImplementedError
end
|
#exists? ⇒ Boolean
17
18
19
20
21
|
# File 'lib/gitlab/ci/project_config/source.rb', line 17
def exists?
strong_memoize(:exists) do
content.present?
end
end
|
#internal_include_prepended? ⇒ Boolean
Indicates if we are prepending the content with an “internal” ‘include`
28
29
30
|
# File 'lib/gitlab/ci/project_config/source.rb', line 28
def internal_include_prepended?
false
end
|
#source ⇒ Object
32
33
34
|
# File 'lib/gitlab/ci/project_config/source.rb', line 32
def source
raise NotImplementedError
end
|
#url ⇒ Object
36
37
38
|
# File 'lib/gitlab/ci/project_config/source.rb', line 36
def url
nil
end
|