Make pipeline variables evaluation concept explicit

This commit is contained in:
Grzegorz Bizon 2018-02-21 14:17:01 +01:00
parent 2da569a229
commit e6498efe0a
1 changed files with 3 additions and 5 deletions

View File

@ -17,13 +17,11 @@ module Gitlab
def initialize(statement, pipeline)
@pipeline = pipeline
@lexer = Expression::Lexer.new(statement)
end
def variables
@variables = pipeline.variables # TODO
end
def tokens
@lexer.tokenize
@tokens ||= @lexer.tokenize
end
def lexemes
@ -50,7 +48,7 @@ module Gitlab
end
def evaluate
parse_tree.evaluate # evaluate(variables)
parse_tree.evaluate(**@variables)
end
end
end