From 49cad30daf6f5e95b0687dcb89cce753319b01fc Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 21 Feb 2018 10:48:58 +0100 Subject: Add a null token to pipelines expressions --- lib/gitlab/ci/pipeline/expression/null.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/gitlab/ci/pipeline/expression/null.rb 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 -- cgit v1.2.1