class Gamertag::Error
Custom error class for rescuing from Xbox Leader API errors which are a little funky at best
Public Class Methods
new(response=nil)
click to toggle source
Calls superclass method
# File lib/gamertag/error.rb, line 5 def initialize(response=nil) @response = response super(build_error_message) end
Private Instance Methods
build_error_message()
click to toggle source
# File lib/gamertag/error.rb, line 11 def build_error_message return nil if @response.nil? "#{@response[:body].data.message}" end