Class: Apnotic::Request
- Inherits:
-
Object
- Object
- Apnotic::Request
- Defined in:
- lib/apnotic/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) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(notification) ⇒ Request
Returns a new instance of Request.
6 7 8 9 10 |
# File 'lib/apnotic/request.rb', line 6 def initialize(notification) @path = "/3/device/#{notification.token}" @headers = build_headers_for notification @body = notification.body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/apnotic/request.rb', line 4 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/apnotic/request.rb', line 4 def headers @headers end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/apnotic/request.rb', line 4 def path @path end |