Class: Gitlab::Ci::Config::External::Processor
- Inherits:
-
Object
- Object
- Gitlab::Ci::Config::External::Processor
- Defined in:
- lib/gitlab/ci/config/external/processor.rb
Constant Summary collapse
- IncludeError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(values, context) ⇒ Processor
constructor
A new instance of Processor.
- #perform ⇒ Object
Constructor Details
#initialize(values, context) ⇒ Processor
Returns a new instance of Processor.
12 13 14 15 16 17 18 19 20 |
# File 'lib/gitlab/ci/config/external/processor.rb', line 12 def initialize(values, context) @values = values @external_files = External::Mapper.new(values, context).process @content = {} @logger = context.logger rescue External::Mapper::Error, OpenSSL::SSL::SSLError => e raise IncludeError, e. end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
10 11 12 |
# File 'lib/gitlab/ci/config/external/processor.rb', line 10 def context @context end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
10 11 12 |
# File 'lib/gitlab/ci/config/external/processor.rb', line 10 def logger @logger end |
Instance Method Details
#perform ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/gitlab/ci/config/external/processor.rb', line 22 def perform return @values if @external_files.empty? validate_external_files! merge_external_files! append_inline_content! remove_include_keyword! end |