Exception: Tomo::Error

Inherits:
StandardError
  • Object
show all
Includes:
Colors
Defined in:
lib/tomo/error.rb,
lib/tomo/error/suggestions.rb

Defined Under Namespace

Classes: Suggestions

Class Method Summary collapse

Methods included from Colors

enabled?

Class Method Details

.raise_with(message = nil, attributes) ⇒ Object



9
10
11
12
13
# File 'lib/tomo/error.rb', line 9

def self.raise_with(message=nil, attributes)
  err = new(message)
  attributes.each { |attr, value| err.public_send(:"#{attr}=", value) }
  raise err
end