Class: ItzLogger::Message
- Inherits:
-
Object
- Object
- ItzLogger::Message
- Defined in:
- lib/itz_logger/message.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(message, type = ItzLogger::MessageType::INFO) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(message, type = ItzLogger::MessageType::INFO) ⇒ Message
Returns a new instance of Message.
17 18 19 20 21 22 23 24 |
# File 'lib/itz_logger/message.rb', line 17 def initialize(, type = ItzLogger::MessageType::INFO) @id = SecureRandom.uuid @message = @type = type @created_at = Time.now.utc end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
15 16 17 |
# File 'lib/itz_logger/message.rb', line 15 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
15 16 17 |
# File 'lib/itz_logger/message.rb', line 15 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
15 16 17 |
# File 'lib/itz_logger/message.rb', line 15 def @message end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
15 16 17 |
# File 'lib/itz_logger/message.rb', line 15 def type @type end |