Class: Adminix::Entities::Log
- Inherits:
-
Object
- Object
- Adminix::Entities::Log
- Defined in:
- lib/adminix/entities/log.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(message, tag = nil) ⇒ Log
constructor
A new instance of Log.
- #to_api ⇒ Object
Constructor Details
#initialize(message, tag = nil) ⇒ Log
Returns a new instance of Log.
6 7 8 9 10 |
# File 'lib/adminix/entities/log.rb', line 6 def initialize(, tag = nil) @message = @tag = tag || 'default' @created_at = Time.now end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/adminix/entities/log.rb', line 4 def created_at @created_at end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/adminix/entities/log.rb', line 4 def @message end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
4 5 6 |
# File 'lib/adminix/entities/log.rb', line 4 def tag @tag end |
Instance Method Details
#to_api ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/adminix/entities/log.rb', line 12 def to_api { message: , tag: tag, created_at: created_at } end |