Class: Gitlab::Ci::Pipeline::Expression::Lexeme::String
- Inherits:
-
Value
- Object
- Base
- Value
- Gitlab::Ci::Pipeline::Expression::Lexeme::String
show all
- Defined in:
- lib/gitlab/ci/pipeline/expression/lexeme/string.rb
Constant Summary
collapse
- PATTERN =
/("(?<string>.*?)")|('(?<string>.*?)')/
Instance Attribute Summary
Attributes inherited from Value
#value
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Value
#initialize, type
Methods inherited from Base
consume?, #name, pattern, scan
Class Method Details
.build(string) ⇒ Object
19
20
21
|
# File 'lib/gitlab/ci/pipeline/expression/lexeme/string.rb', line 19
def self.build(string)
new(string.match(PATTERN)[:string])
end
|
Instance Method Details
#evaluate(variables = {}) ⇒ Object
11
12
13
|
# File 'lib/gitlab/ci/pipeline/expression/lexeme/string.rb', line 11
def evaluate(variables = {})
@value.to_s
end
|
#inspect ⇒ Object
15
16
17
|
# File 'lib/gitlab/ci/pipeline/expression/lexeme/string.rb', line 15
def inspect
@value.inspect
end
|