Exception: Expo::Push::TicketsWithErrors
- 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:) ⇒ TicketsWithErrors
constructor
A new instance of TicketsWithErrors.
Methods inherited from Error
Constructor Details
#initialize(errors:, data:) ⇒ TicketsWithErrors
Returns a new instance of TicketsWithErrors.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/push/client.rb', line 50 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 puts errors super "Expo indicated one or more problems: #{errors.map { |error| error['message'] }}" end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
48 49 50 |
# File 'lib/push/client.rb', line 48 def data @data end |
#errors ⇒ Object
Returns the value of attribute errors.
48 49 50 |
# File 'lib/push/client.rb', line 48 def errors @errors end |