Exception: Tramway::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/tramway/error.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, plugin: nil, method: nil, message: nil) ⇒ Error

Returns a new instance of Error.



2
3
4
5
6
7
8
# File 'lib/tramway/error.rb', line 2

def initialize(*args, plugin: nil, method: nil, message: nil)
  @properties ||= {}
  @properties[:plugin] = plugin
  @properties[:method] = method
  @properties[:message] = message
  super(*args)
end

Instance Method Details

#messageObject



10
11
12
# File 'lib/tramway/error.rb', line 10

def message
  "Plugin: #{@properties[:plugin]}; Method: #{@properties[:method]}; Message: #{@properties[:message]}"
end

#propertiesObject



14
15
16
# File 'lib/tramway/error.rb', line 14

def properties
  @properties ||= {}
end