Class: Foxtail::Bundle::Parser::AST::TermReference
- Inherits:
-
Data
- Object
- Data
- Foxtail::Bundle::Parser::AST::TermReference
- Defined in:
- lib/foxtail/bundle/parser/ast.rb,
lib/foxtail/bundle/parser/ast.rb
Overview
Term reference expression (-term) in Fluent patterns
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
- Array
-
Arguments passed to the term.
-
#attr ⇒ Object
readonly
- String, nil
-
The attribute name if accessing an attribute.
-
#name ⇒ Object
readonly
- String
-
The term name (without - prefix).
Instance Method Summary collapse
-
#initialize(name:, attr: nil, args: []) ⇒ TermReference
constructor
A new instance of TermReference.
Constructor Details
#initialize(name:, attr: nil, args: []) ⇒ TermReference
Returns a new instance of TermReference.
48 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 48 def initialize(name:, attr: nil, args: []) = super(name: name.to_s, attr: attr&.to_s, args:) |
Instance Attribute Details
#args ⇒ Object (readonly)
- Array
-
Arguments passed to the term
44 45 46 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 44 def args @args end |
#attr ⇒ Object (readonly)
- String, nil
-
The attribute name if accessing an attribute
44 45 46 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 44 def attr @attr end |
#name ⇒ Object (readonly)
- String
-
The term name (without - prefix)
44 45 46 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 44 def name @name end |