Exception: Expo::Push::ReceiptsWithErrors
- Defined in:
- lib/push/client.rb
Overview
rubocop:disable Style/Documentation
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(errors:, data:) ⇒ ReceiptsWithErrors
constructor
A new instance of ReceiptsWithErrors.
Methods inherited from Error
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
#data ⇒ Object
Returns the value of attribute data.
90 91 92 |
# File 'lib/push/client.rb', line 90 def data @data end |
#errors ⇒ Object
Returns the value of attribute errors.
90 91 92 |
# File 'lib/push/client.rb', line 90 def errors @errors end |