Module: Safire::Errors::ReceivesFields Private

Included in:
RegistrationError, TokenError
Defined in:
lib/safire/errors.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Shared mixin for TokenError and RegistrationError: provides the received_fields attribute and its constructor forwarding. Both classes report structural response failures where a required field (access_token or client_id) is absent.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



162
163
164
# File 'lib/safire/errors.rb', line 162

def self.included(base)
  base.attr_reader :received_fields
end

Instance Method Details

#initialize(received_fields: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



166
167
168
169
# File 'lib/safire/errors.rb', line 166

def initialize(received_fields: nil, **)
  @received_fields = received_fields
  super(**)
end