Class: Roast::Log::Message
- Inherits:
-
Object
- Object
- Roast::Log::Message
- Defined in:
- lib/roast/log.rb
Overview
A log message paired with its originating type, so downstream handlers (e.g. the formatter) can render or route it by type.
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
: String.
-
#type ⇒ Object
readonly
: Symbol.
Instance Method Summary collapse
-
#initialize(type:, text:) ⇒ Message
constructor
: (type: Symbol, text: String) -> void.
-
#to_s ⇒ Object
: () -> String.
Constructor Details
#initialize(type:, text:) ⇒ Message
: (type: Symbol, text: String) -> void
34 35 36 37 |
# File 'lib/roast/log.rb', line 34 def initialize(type:, text:) @type = type @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
: String
31 32 33 |
# File 'lib/roast/log.rb', line 31 def text @text end |
#type ⇒ Object (readonly)
: Symbol
28 29 30 |
# File 'lib/roast/log.rb', line 28 def type @type end |
Instance Method Details
#to_s ⇒ Object
: () -> String
40 41 42 |
# File 'lib/roast/log.rb', line 40 def to_s text end |