Module: Tele::Idele::Errors::ExceptionNormalization::Initializer

Defined in:
lib/tele/idele/ednotif/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code


4
5
6
# File 'lib/tele/idele/ednotif/errors.rb', line 4

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message


4
5
6
# File 'lib/tele/idele/ednotif/errors.rb', line 4

def message
  @message
end

Instance Method Details

#initialize(options = {}) ⇒ Object


6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/tele/idele/ednotif/errors.rb', line 6

def initialize(options = {})
  @code = options[:code]
  @message = options[:message]
  log = ''

  log = @code + ': ' unless @code.nil?

  log += @message unless @message.nil?

  Rails.logger.warn log
  super @message
end