Commit a4a29e2e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add TODOs to refactoried variables collections code

parent b94db067
...@@ -14,6 +14,7 @@ module Gitlab ...@@ -14,6 +14,7 @@ module Gitlab
@variables.append(Collection::Item.fabricate(resource)) @variables.append(Collection::Item.fabricate(resource))
end end
# TODO, specs
def concat(resources) def concat(resources)
resources.each { |variable| self.append(variable) } resources.each { |variable| self.append(variable) }
end end
......
...@@ -3,6 +3,8 @@ module Gitlab ...@@ -3,6 +3,8 @@ module Gitlab
module Variables module Variables
class Collection class Collection
class Item class Item
# TODO, public by default?
#
def initialize(**options) def initialize(**options)
@variable = { @variable = {
key: options.fetch(:key), key: options.fetch(:key),
...@@ -28,6 +30,8 @@ module Gitlab ...@@ -28,6 +30,8 @@ module Gitlab
end end
def self.fabricate(resource) def self.fabricate(resource)
# TODO, to_runner_variable by default for class < ActiveRecord::Base
#
case resource case resource
when Hash when Hash
self.new(resource) self.new(resource)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment