Exception: Expo::Push::TicketsExpectationFailed

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(expected_count:, data:) ⇒ TicketsExpectationFailed

Returns a new instance of TicketsExpectationFailed.



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/push/client.rb', line 72

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

  super format(
    "Expected %<count>s ticket#{if expected_count != 1
                                  's'
                                end}, actual: %<actual>s. The response data can be inspected.",
    count: expected_count,
    actual: data.is_a?(Array) ? data.length : '<not a list of tickets>'
  )
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



70
71
72
# File 'lib/push/client.rb', line 70

def data
  @data
end