Class: Gitlab::Ci::Pipeline::Expression::Lexeme::Null

Inherits:
Value
  • Object
show all
Defined in:
lib/gitlab/ci/pipeline/expression/lexeme/null.rb

Constant Summary collapse

PATTERN =
/null/.freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Value

type

Methods inherited from Base

consume?, #name, pattern, scan

Constructor Details

#initialize(value = nil) ⇒ Null

Returns a new instance of Null.


11
12
13
# File 'lib/gitlab/ci/pipeline/expression/lexeme/null.rb', line 11

def initialize(value = nil)
  super
end

Class Method Details

.build(_value) ⇒ Object


23
24
25
# File 'lib/gitlab/ci/pipeline/expression/lexeme/null.rb', line 23

def self.build(_value)
  self.new
end

Instance Method Details

#evaluate(variables = {}) ⇒ Object


15
16
17
# File 'lib/gitlab/ci/pipeline/expression/lexeme/null.rb', line 15

def evaluate(variables = {})
  nil
end

#inspectObject


19
20
21
# File 'lib/gitlab/ci/pipeline/expression/lexeme/null.rb', line 19

def inspect
  'null'
end