Class: Foxtail::Bundle::Parser::AST::Message

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

Overview

Message entry in fluent-bundle compatible format

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, value: nil, attributes: nil) ⇒ Message

Returns a new instance of Message.

Parameters:

  • id (#to_s)

    The message identifier (will be converted to String)

  • value (defaults to: nil)

    The message pattern (default: nil)

  • attributes (Hash, nil) (defaults to: nil)

    Message attributes (default: nil)



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

def initialize(id:, value: nil, attributes: nil) = super(id: id.to_s, value:, attributes:)

Instance Attribute Details

#attributesObject (readonly)

Hash, nil

Message attributes



106
107
108
# File 'lib/foxtail/bundle/parser/ast.rb', line 106

def attributes
  @attributes
end

#idObject (readonly)

String

The message identifier



106
107
108
# File 'lib/foxtail/bundle/parser/ast.rb', line 106

def id
  @id
end

#valueObject (readonly)

The message pattern (String or Array)



106
107
108
# File 'lib/foxtail/bundle/parser/ast.rb', line 106

def value
  @value
end