Class: GrowthPush::Request

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, endpoint, headers, params) ⇒ Request

Returns a new instance of Request.



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

def initialize(method, endpoint, headers, params)
  @method   = method
  @endpoint = endpoint
  @headers  = headers
  @params   = params
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



5
6
7
# File 'lib/growth_push/request.rb', line 5

def endpoint
  @endpoint
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/growth_push/request.rb', line 5

def headers
  @headers
end

#methodObject (readonly)

Returns the value of attribute method.



5
6
7
# File 'lib/growth_push/request.rb', line 5

def method
  @method
end

#paramsObject (readonly)

Returns the value of attribute params.



5
6
7
# File 'lib/growth_push/request.rb', line 5

def params
  @params
end

Instance Method Details

#createObject



14
15
16
# File 'lib/growth_push/request.rb', line 14

def create
  send(method)
end