lib/hallon/error.rb in hallon-0.2.1 vs lib/hallon/error.rb in hallon-0.3.0

- old
+ new

@@ -3,9 +3,16 @@ # Thrown by Hallon on libspotify errors. # # @see http://developer.spotify.com/en/libspotify/docs/group__error.html class Error < RuntimeError class << self + # Hash of error (Symbol) to code (Integer). + # + # @return [Hash<Symbol, Integer>] + def table + Spotify::enum_type(:error).to_hash + end + # Given a number or a symbol, find both the symbol and the error # number it represents. # # @param [Symbol, Fixnum] error # @return [[Fixnum, Symbol]] (error code, error symbol)