Class: Pushr::Daemon::Apns2Support::Request
- Inherits:
-
Object
- Object
- Pushr::Daemon::Apns2Support::Request
- Defined in:
- lib/pushr/daemon/apns2_support/request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(notification, token) ⇒ Request
constructor
A new instance of Request.
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5 def headers @headers end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/pushr/daemon/apns2_support/request.rb', line 5 def path @path end |