Class: APIGatewayDSL::Response::Collection

Inherits:
Array
  • Object
show all
Defined in:
lib/api_gateway_dsl/response/collection.rb

Instance Method Summary collapse

Instance Method Details

#as_jsonObject



13
14
15
# File 'lib/api_gateway_dsl/response/collection.rb', line 13

def as_json
  index_by(&:status_code).transform_values(&:as_json)
end

#content_typesObject



5
6
7
# File 'lib/api_gateway_dsl/response/collection.rb', line 5

def content_types
  flat_map(&:content_types).uniq
end

#response_integrationsObject



9
10
11
# File 'lib/api_gateway_dsl/response/collection.rb', line 9

def response_integrations
  ResponseIntegration::Collection.new.concat(map(&:response_integration))
end