Exception: Lingo::LingoError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lingo/error.rb

Instance Method Summary collapse

Instance Method Details

#class_nameObject



31
32
33
# File 'lib/lingo/error.rb', line 31

def class_name
  klass.name.split('::').last
end

#error(msg = 'An error occurred') ⇒ Object



35
36
37
# File 'lib/lingo/error.rb', line 35

def error(msg = 'An error occurred')
  "#{msg}: #{err} (#{err.class})"
end