Class: Gitlab::TemplateParser::AST::Selector
- Inherits:
-
Struct
- Object
- Struct
- Gitlab::TemplateParser::AST::Selector
- Defined in:
- lib/gitlab/template_parser/ast.rb
Overview
A selector used for loading a value.
Instance Attribute Summary collapse
-
#steps ⇒ Object
Returns the value of attribute steps.
Instance Method Summary collapse
Instance Attribute Details
#steps ⇒ Object
Returns the value of attribute steps
59 60 61 |
# File 'lib/gitlab/template_parser/ast.rb', line 59 def steps @steps end |
Instance Method Details
#evaluate(state, data) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/gitlab/template_parser/ast.rb', line 60 def evaluate(state, data) steps.reduce(data) do |current, step| break if current.nil? step.evaluate(state, current) end end |