Class: ApnsGatling::Request

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, auth_token, host) ⇒ Request

Returns a new instance of Request.



5
6
7
8
9
10
11
12
# File 'lib/apns_gatling/request.rb', line 5

def initialize(message, auth_token, host)
  path = "/3/device/#{message.token}"
  @id = message.apns_id
  @path = path
  @auth_token = auth_token
  @headers = headers_from message, auth_token, host, path
  @data = message.payload_data
end

Instance Attribute Details

#auth_tokenObject (readonly)

Returns the value of attribute auth_token.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def auth_token
  @auth_token
end

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def data
  @data
end

#headersObject (readonly)

Returns the value of attribute headers.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def headers
  @headers
end

#hostObject (readonly)

Returns the value of attribute host.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def host
  @host
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def id
  @id
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/apns_gatling/request.rb', line 3

def path
  @path
end