Class: Chaplin::Responses::Redirect

Inherits:
Struct
  • Object
show all
Defined in:
lib/chaplin/responses/redirect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_requests_hashObject

Returns the value of attribute api_requests_hash

Returns:

  • (Object)

    the current value of api_requests_hash



6
7
8
# File 'lib/chaplin/responses/redirect.rb', line 6

def api_requests_hash
  @api_requests_hash
end

#redirect_pathObject

Returns the value of attribute redirect_path

Returns:

  • (Object)

    the current value of redirect_path



6
7
8
# File 'lib/chaplin/responses/redirect.rb', line 6

def redirect_path
  @redirect_path
end

Instance Method Details

#execute(request_params, sinatra_server) ⇒ Object



8
9
10
11
12
# File 'lib/chaplin/responses/redirect.rb', line 8

def execute(request_params, sinatra_server)
  rendered_api_data = rendered_data(request_params)

  sinatra_server.redirect(rendered_path(rendered_api_data, request_params))
end