Class: Apnotic::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/apnotic/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/apnotic/request.rb', line 4

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/apnotic/request.rb', line 4

def headers
  @headers
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/apnotic/request.rb', line 4

def path
  @path
end