debian-mirror-gitlab/lib/gitlab/ci/config/node/undefined.rb

31 lines
589 B
Ruby
Raw Normal View History

2016-08-24 12:49:21 +05:30
module Gitlab
module Ci
class Config
module Node
##
# This class represents an undefined entry node.
#
# It takes original entry class as configuration and returns default
# value of original entry as self value.
#
#
class Undefined < Entry
include Validatable
validations do
validates :config, type: Class
end
def value
@config.default
end
def defined?
false
end
end
end
end
end
end