Method: Gitlab::Ci::Config::Interpolation::Config#replace!

Defined in:
lib/gitlab/ci/config/interpolation/config.rb

#replace!(&block) ⇒ Object

The replace! method will yield a block and replace each of the hash config nodes with the return value of the block.

It returns nil if there were errors found during the process.



71
72
73
74
75
76
77
78
79
# File 'lib/gitlab/ci/config/interpolation/config.rb', line 71

def replace!(&block)
  recursive_replace(@config, Visitor.new, &block)
rescue TooManyNodesError
  @errors.push('config too large')
  nil
rescue NodeTooLargeError
  @errors.push('config node too large')
  nil
end