Class: Rusen::Notification

Inherits:
Object
  • Object
show all
Defined in:
lib/rusen/notification.rb

Overview

Class for holding all the information that can be sent in a notification.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception, request = nil, environment = nil, session = nil) ⇒ Notification

Returns a new instance of Notification.



8
9
10
11
12
13
# File 'lib/rusen/notification.rb', line 8

def initialize(exception, request = nil, environment = nil, session = nil)
  @exception = exception
  @request = request || {}
  @environment = environment  || {}
  @session = session || {}
end

Instance Attribute Details

#environmentObject (readonly)

Returns the value of attribute environment.



6
7
8
# File 'lib/rusen/notification.rb', line 6

def environment
  @environment
end

#exceptionObject (readonly)

Returns the value of attribute exception.



6
7
8
# File 'lib/rusen/notification.rb', line 6

def exception
  @exception
end

#requestObject (readonly)

Returns the value of attribute request.



6
7
8
# File 'lib/rusen/notification.rb', line 6

def request
  @request
end

#sessionObject (readonly)

Returns the value of attribute session.



6
7
8
# File 'lib/rusen/notification.rb', line 6

def session
  @session
end