summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-21 10:48:58 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-02-21 10:48:58 +0100
commit49cad30daf6f5e95b0687dcb89cce753319b01fc (patch)
tree8d50ec61b5f786e04e3cdea575bc1a73278c8b74
parentfa2a5468368a2ed65de2d7be079a443a4180d171 (diff)
downloadgitlab-ce-49cad30daf6f5e95b0687dcb89cce753319b01fc.tar.gz
Add a null token to pipelines expressions
-rw-r--r--lib/gitlab/ci/pipeline/expression/null.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/gitlab/ci/pipeline/expression/null.rb b/lib/gitlab/ci/pipeline/expression/null.rb
new file mode 100644
index 00000000000..d33f0bffc48
--- /dev/null
+++ b/lib/gitlab/ci/pipeline/expression/null.rb
@@ -0,0 +1,19 @@
+module Gitlab
+ module Ci
+ module Pipeline
+ module Expression
+ class Null < Expression::Token
+ PATTERN = /null/.freeze
+
+ def initialize(value)
+ @value = value
+ end
+
+ def evaluate(**_)
+ nil
+ end
+ end
+ end
+ end
+ end
+end