2016-06-07 09:58:02 +00:00
|
|
|
module Gitlab
|
|
|
|
module Ci
|
|
|
|
class Config
|
|
|
|
module Node
|
2016-06-10 09:20:46 +00:00
|
|
|
##
|
2016-06-22 12:26:33 +00:00
|
|
|
# This class represents an undefined entry node.
|
2016-06-10 09:20:46 +00:00
|
|
|
#
|
2016-06-22 12:26:33 +00:00
|
|
|
# It takes original entry class as configuration and returns default
|
|
|
|
# value of original entry as self value.
|
2016-06-10 09:20:46 +00:00
|
|
|
#
|
2016-06-22 08:44:33 +00:00
|
|
|
#
|
|
|
|
class Undefined < Entry
|
2016-06-22 12:26:33 +00:00
|
|
|
include Validatable
|
|
|
|
|
|
|
|
validations do
|
|
|
|
validates :config, type: Class
|
|
|
|
end
|
|
|
|
|
|
|
|
def value
|
|
|
|
@config.default
|
2016-06-07 09:58:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|