You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::Rest::Response::Parser

Inherits:
Object
  • Object
show all
Defined in:
gems/aws-sdk-core/lib/aws-sdk-core/rest/response/parser.rb

Instance Method Summary collapse

Instance Method Details

#apply(response) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/response/parser.rb', line 6

def apply(response)
  # TODO : remove this unless check once response stubbing is fixed
  if rules = response.context.operation.output
    response.data = rules.shape.struct_class.new
    extract_status_code(rules, response)
    extract_headers(rules, response)
    extract_body(rules, response)
  else
    response.data = EmptyStructure.new
  end
end