Exception: Tramway::Error

Inherits:
RuntimeError
  • 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.



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

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



12
13
14
# File 'lib/tramway/error.rb', line 12

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

#propertiesObject



16
17
18
# File 'lib/tramway/error.rb', line 16

def properties
  @properties ||= {}
end