Class: Gitlab::TemplateParser::AST::Variable

Inherits:
Struct
  • Object
show all
Defined in:
lib/gitlab/template_parser/ast.rb

Overview

A tag used for displaying a value in the output.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selectorObject

Returns the value of attribute selector

Returns:

  • (Object)

    the current value of selector



70
71
72
# File 'lib/gitlab/template_parser/ast.rb', line 70

def selector
  @selector
end

Instance Method Details

#evaluate(state, data) ⇒ Object



71
72
73
# File 'lib/gitlab/template_parser/ast.rb', line 71

def evaluate(state, data)
  selector.evaluate(state, data).to_s
end