Class: Loga::Event
- Inherits:
-
Object
- Object
- Loga::Event
- Defined in:
- lib/loga/event.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#exception ⇒ Object
Returns the value of attribute exception.
-
#message ⇒ Object
Returns the value of attribute message.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(opts = {}) ⇒ Event
Returns a new instance of Event.
5 6 7 8 9 10 11 |
# File 'lib/loga/event.rb', line 5 def initialize(opts = {}) @data = opts[:data] @exception = opts[:exception] @message = safe_encode(opts[:message]) @timestamp = opts[:timestamp] @type = opts[:type] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/loga/event.rb', line 3 def data @data end |
#exception ⇒ Object
Returns the value of attribute exception.
3 4 5 |
# File 'lib/loga/event.rb', line 3 def exception @exception end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/loga/event.rb', line 3 def @message end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/loga/event.rb', line 3 def @timestamp end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/loga/event.rb', line 3 def type @type end |