summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/config/node/null.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/ci/config/node/null.rb')
-rw-r--r--lib/gitlab/ci/config/node/null.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/gitlab/ci/config/node/null.rb b/lib/gitlab/ci/config/node/null.rb
new file mode 100644
index 00000000000..88a5f53f13c
--- /dev/null
+++ b/lib/gitlab/ci/config/node/null.rb
@@ -0,0 +1,34 @@
+module Gitlab
+ module Ci
+ class Config
+ module Node
+ ##
+ # This class represents an undefined node.
+ #
+ # Implements the Null Object pattern.
+ #
+ class Null < Entry
+ def value
+ nil
+ end
+
+ def valid?
+ true
+ end
+
+ def errors
+ []
+ end
+
+ def specified?
+ false
+ end
+
+ def relevant?
+ false
+ end
+ end
+ end
+ end
+ end
+end