Class: Foxtail::Bundle::Parser::AST::VariableReference

Inherits:
Data
  • Object
show all
Defined in:
lib/foxtail/bundle/parser/ast.rb,
lib/foxtail/bundle/parser/ast.rb

Overview

Variable reference expression ($variable) in Fluent patterns

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:) ⇒ VariableReference

Returns a new instance of VariableReference.

Parameters:

  • name (#to_s)

    The variable name (will be converted to String)



35
# File 'lib/foxtail/bundle/parser/ast.rb', line 35

def initialize(name:) = super(name: name.to_s)

Instance Attribute Details

#nameObject (readonly)

String

The variable name (without $ prefix)



33
34
35
# File 'lib/foxtail/bundle/parser/ast.rb', line 33

def name
  @name
end