Class: OneSignal::Responses::BaseResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/onesignal/responses/base_response.rb

Direct Known Subclasses

Notification, Player

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BaseResponse

Returns a new instance of BaseResponse.



6
7
8
9
10
# File 'lib/onesignal/responses/base_response.rb', line 6

def initialize attributes = {}
  @attributes = attributes.deep_symbolize_keys
                          .keep_if { |k, _v| self.class::ATTRIBUTES_WHITELIST.include?(k.to_sym) }
  self.class.attr_reader(*self.class::ATTRIBUTES_WHITELIST)
end