Method: Spotify::Models::Error#initialize
- Defined in:
- lib/spotify/models/error.rb
#initialize(type, args = {}) ⇒ Parsers::Error
Creates the message.
47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/spotify/models/error.rb', line 47 def initialize(type, args = {}) if type == DEFAULT error = { status: args[:status], message: args[:message] } else error = ERRORS[type] end @status = error[:status] @message = error[:message] end |