Class: Gitlab::Ci::Config::External::File::Template
- Defined in:
- lib/gitlab/ci/config/external/file/template.rb
Constant Summary collapse
- SUFFIX =
'.gitlab-ci.yml'
Constants inherited from Base
Base::YAML_WHITELIST_EXTENSION
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Attributes inherited from Base
Instance Method Summary collapse
- #content ⇒ Object
-
#initialize(params, context) ⇒ Template
constructor
A new instance of Template.
Methods inherited from Base
#error_message, #invalid_extension?, #invalid_location_type?, #matching?, #to_hash, #valid?
Methods included from Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Constructor Details
#initialize(params, context) ⇒ Template
Returns a new instance of Template.
13 14 15 16 17 |
# File 'lib/gitlab/ci/config/external/file/template.rb', line 13 def initialize(params, context) @location = params[:template] super end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location
9 10 11 |
# File 'lib/gitlab/ci/config/external/file/template.rb', line 9 def location @location end |
#project ⇒ Object (readonly)
Returns the value of attribute project
9 10 11 |
# File 'lib/gitlab/ci/config/external/file/template.rb', line 9 def project @project end |
Instance Method Details
#content ⇒ Object
19 20 21 |
# File 'lib/gitlab/ci/config/external/file/template.rb', line 19 def content strong_memoize(:content) { fetch_template_content } end |