Exception: Expo::Push::ReceiptsWithErrors

Inherits:
Error
  • Object
show all
Defined in:
lib/push/client.rb

Overview

rubocop:disable Style/Documentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

explain

Constructor Details

#initialize(errors:, data:) ⇒ ReceiptsWithErrors

Returns a new instance of ReceiptsWithErrors.



92
93
94
95
96
97
98
99
100
101
102
# File 'lib/push/client.rb', line 92

def initialize(errors:, data:)
  self.data = data
  self.errors = errors

  if errors.length.zero?
    super 'Expected at least one error, but got none'
    return
  end

  super "Expo indicated one or more problems: #{errors.map { |error| error[:message] }}"
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



90
91
92
# File 'lib/push/client.rb', line 90

def data
  @data
end

#errorsObject

Returns the value of attribute errors.



90
91
92
# File 'lib/push/client.rb', line 90

def errors
  @errors
end