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))
|
||||
end
|
||||
|
||||
# TODO, specs
|
||||
def concat(resources)
|
||||
resources.each { |variable| self.append(variable) }
|
||||
end
|
||||
|
|
|
@ -3,6 +3,8 @@ module Gitlab
|
|||
module Variables
|
||||
class Collection
|
||||
class Item
|
||||
# TODO, public by default?
|
||||
#
|
||||
def initialize(**options)
|
||||
@variable = {
|
||||
key: options.fetch(:key),
|
||||
|
@ -28,6 +30,8 @@ module Gitlab
|
|||
end
|
||||
|
||||
def self.fabricate(resource)
|
||||
# TODO, to_runner_variable by default for class < ActiveRecord::Base
|
||||
#
|
||||
case resource
|
||||
when Hash
|
||||
self.new(resource)
|
||||
|
|
Loading…
Reference in a new issue