class APIGatewayDSL::DSL::ResponseNode
Public Class Methods
new(response, &block)
click to toggle source
# File lib/api_gateway_dsl/dsl/response_node.rb, line 5 def initialize(response, &block) @response = response instance_eval(&block) if block end
Public Instance Methods
body(**options)
click to toggle source
Templates
# File lib/api_gateway_dsl/dsl/response_node.rb, line 18 def body(**options) @response.templates << Template.new(@response.context, **options) end
header(name, source = nil)
click to toggle source
Header Mappings
# File lib/api_gateway_dsl/dsl/response_node.rb, line 12 def header(name, source = nil) @response.mappings << Mapping.new('method', 'response', 'header', name, source) end