Class: ScalarRubyTest::Runtime::RawResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/amritk-scalar-test/runtime.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, status:, headers:, body:) ⇒ RawResponse

Returns a new instance of RawResponse.



85
86
87
88
89
90
# File 'lib/amritk-scalar-test/runtime.rb', line 85

def initialize(data:, status:, headers:, body:)
  @data = data
  @status = status
  @headers = headers
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



83
84
85
# File 'lib/amritk-scalar-test/runtime.rb', line 83

def body
  @body
end

#dataObject (readonly)

Returns the value of attribute data.



83
84
85
# File 'lib/amritk-scalar-test/runtime.rb', line 83

def data
  @data
end

#headersObject (readonly)

Returns the value of attribute headers.



83
84
85
# File 'lib/amritk-scalar-test/runtime.rb', line 83

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



83
84
85
# File 'lib/amritk-scalar-test/runtime.rb', line 83

def status
  @status
end

Instance Method Details

#mapObject



92
93
94
# File 'lib/amritk-scalar-test/runtime.rb', line 92

def map
  self.class.new(data: yield(@data), status: @status, headers: @headers, body: @body)
end