Class: Foxtail::Bundle::Parser::AST::FunctionReference

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

Overview

Function call expression (FUNCTION()) in Fluent patterns

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, args: []) ⇒ FunctionReference

Returns a new instance of FunctionReference.

Parameters:

  • name (#to_s)

    The function name (will be converted to String)

  • args (Array) (defaults to: [])

    Function arguments (default: [])



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

def initialize(name:, args: []) = super(name: name.to_s, args:)

Instance Attribute Details

#argsObject (readonly)

Array

Function arguments (positional and named)



67
68
69
# File 'lib/foxtail/bundle/parser/ast.rb', line 67

def args
  @args
end

#nameObject (readonly)

String

The function name (uppercase by convention)



67
68
69
# File 'lib/foxtail/bundle/parser/ast.rb', line 67

def name
  @name
end