Class: Gitlab::Ci::Variables::Downstream::Generator
- Inherits:
-
Object
- Object
- Gitlab::Ci::Variables::Downstream::Generator
- 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.
10 11 12 13 14 15 16 17 |
# File 'lib/gitlab/ci/variables/downstream/generator.rb', line 10 def initialize(bridge) @bridge = bridge context = Context.new(all_bridge_variables: bridge.variables, expand_file_refs: false) @raw_variable_generator = RawVariableGenerator.new(context) @expandable_variable_generator = ExpandableVariableGenerator.new(context) end |
Instance Method Details
#calculate ⇒ Object
19 20 21 22 23 24 |
# File 'lib/gitlab/ci/variables/downstream/generator.rb', line 19 def calculate calculate_downstream_variables .reverse # variables priority .uniq { |var| var[:key] } # only one variable key to pass .reverse end |