Class: Gitlab::Ci::Variables::Downstream::Generator
- Inherits:
-
Object
- Object
- Gitlab::Ci::Variables::Downstream::Generator
- Includes:
- Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/variables/downstream/generator.rb
Defined Under Namespace
Classes: Context
Instance Method Summary collapse
- #calculate ⇒ Object
-
#initialize(bridge) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(bridge) ⇒ Generator
Returns a new instance of Generator.
12 13 14 15 16 17 18 19 |
# File 'lib/gitlab/ci/variables/downstream/generator.rb', line 12 def initialize(bridge) @bridge = bridge context = Context.new(all_bridge_variables: bridge.variables, expand_file_refs: bridge.) @raw_variable_generator = RawVariableGenerator.new(context) @expandable_variable_generator = ExpandableVariableGenerator.new(context) end |
Instance Method Details
#calculate ⇒ Object
21 22 23 24 25 26 |
# File 'lib/gitlab/ci/variables/downstream/generator.rb', line 21 def calculate calculate_downstream_variables .reverse # variables priority .uniq { |var| var[:key] } # only one variable key to pass .reverse end |