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

Class: Aws::Rest::Response::StatusCode

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

Instance Method Summary collapse

Constructor Details

#initialize(rules) ⇒ StatusCode

Returns a new instance of StatusCode

Parameters:



7
8
9
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/response/status_code.rb', line 7

def initialize(rules)
  @rules = rules
end

Instance Method Details

#apply(http_resp, data) ⇒ Object

Parameters:



13
14
15
16
17
18
19
# File 'gems/aws-sdk-core/lib/aws-sdk-core/rest/response/status_code.rb', line 13

def apply(http_resp, data)
  @rules.shape.members.each do |member_name, member_ref|
    if member_ref.location == 'statusCode'
      data[member_name] = http_resp.status_code
    end
  end
end