Class: RDStation::ErrorHandler::ExpiredCodeGrant

Inherits:
Object
  • Object
show all
Defined in:
lib/rdstation/error_handler/expired_code_grant.rb

Constant Summary collapse

ERROR_CODE =
'EXPIRED_CODE_GRANT'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ ExpiredCodeGrant

Returns a new instance of ExpiredCodeGrant.



8
9
10
# File 'lib/rdstation/error_handler/expired_code_grant.rb', line 8

def initialize(errors)
  @errors = errors
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



4
5
6
# File 'lib/rdstation/error_handler/expired_code_grant.rb', line 4

def errors
  @errors
end

Instance Method Details

#raise_errorObject



12
13
14
15
# File 'lib/rdstation/error_handler/expired_code_grant.rb', line 12

def raise_error
  return if expired_code_errors.empty?
  raise RDStation::Error::ExpiredCodeGrant, expired_code_errors.first
end