Class: Pushr::Daemon::Apns2Support::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/pushr/daemon/apns2_support/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(notification, token) ⇒ Request

Returns a new instance of Request.



7
8
9
10
11
# File 'lib/pushr/daemon/apns2_support/request.rb', line 7

def initialize(notification, token)
  @path = "/3/device/#{notification.token}"
  @headers = build_headers_for(notification, token)
  @body = notification.body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5

def headers
  @headers
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5

def path
  @path
end