Sha256: 49816583978fda826ff52083512643bd78a335f74709810122f9281f289ab4f6
Contents?: true
Size: 465 Bytes
Versions: 10
Compression:
Stored size: 465 Bytes
Contents
require_relative 'invalid_format_error' module Grocer class FailedDeliveryAttempt LENGTH = 38 attr_accessor :timestamp, :device_token def initialize(binary_tuple) # N => 4 byte timestamp # n => 2 byte token_length # H64 => 32 byte device_token seconds, _, @device_token = binary_tuple.unpack('NnH64') raise InvalidFormatError unless seconds && @device_token @timestamp = Time.at(seconds) end end end
Version data entries
10 entries across 10 versions & 1 rubygems