Class: Foxtail::Bundle::Parser::AST::MessageReference
- Inherits:
-
Data
- Object
- Data
- Foxtail::Bundle::Parser::AST::MessageReference
- Defined in:
- lib/foxtail/bundle/parser/ast.rb,
lib/foxtail/bundle/parser/ast.rb
Overview
Message reference expression (message) in Fluent patterns
Instance Attribute Summary collapse
-
#attr ⇒ Object
readonly
- String, nil
-
The attribute name if accessing an attribute.
-
#name ⇒ Object
readonly
- String
-
The message identifier.
Instance Method Summary collapse
-
#initialize(name:, attr: nil) ⇒ MessageReference
constructor
A new instance of MessageReference.
Constructor Details
#initialize(name:, attr: nil) ⇒ MessageReference
Returns a new instance of MessageReference.
59 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 59 def initialize(name:, attr: nil) = super(name: name.to_s, attr: attr&.to_s) |
Instance Attribute Details
#attr ⇒ Object (readonly)
- String, nil
-
The attribute name if accessing an attribute
56 57 58 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 56 def attr @attr end |
#name ⇒ Object (readonly)
- String
-
The message identifier
56 57 58 |
# File 'lib/foxtail/bundle/parser/ast.rb', line 56 def name @name end |