Add TODOs to refactoried variables collections code
This commit is contained in:
parent
b94db067b7
commit
a4a29e2ee1
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
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
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue