Class: ElephantInTheRoom::TheOneApiSdk::Pipeline::SetPath

Inherits:
Object
  • Object
show all
Defined in:
lib/elephant_in_the_room/the_one_api_sdk/pipeline/set_path.rb

Overview

Pipeline stage to set the path into the HTTP request

Instance Method Summary collapse

Constructor Details

#initialize(next_pipeline_stage, path) ⇒ SetPath

Returns a new instance of SetPath.



7
8
9
10
# File 'lib/elephant_in_the_room/the_one_api_sdk/pipeline/set_path.rb', line 7

def initialize(next_pipeline_stage, path)
  @next_pipeline_stage = next_pipeline_stage
  @path = path
end

Instance Method Details

#execute_http_request(request_details) ⇒ Object



12
13
14
15
16
# File 'lib/elephant_in_the_room/the_one_api_sdk/pipeline/set_path.rb', line 12

def execute_http_request(request_details)
  request_details[:path] = @path

  @next_pipeline_stage.execute_http_request(request_details)
end

#http_responseObject



18
19
20
# File 'lib/elephant_in_the_room/the_one_api_sdk/pipeline/set_path.rb', line 18

def http_response
  @next_pipeline_stage.http_response
end