|
|
|
@ -5,24 +5,14 @@ require 'linzer/message/adapter/http_gem/response'
|
|
|
|
|
|
|
|
|
|
|
|
module Linzer::Message::Adapter
|
|
|
|
module Linzer::Message::Adapter
|
|
|
|
module ActionDispatch
|
|
|
|
module ActionDispatch
|
|
|
|
class Response < Linzer::Message::Adapter::Abstract
|
|
|
|
class Response < Linzer::Message::Adapter::Generic::Response
|
|
|
|
def initialize(operation, **_options) # rubocop:disable Lint/MissingSuper
|
|
|
|
private
|
|
|
|
@operation = operation
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def header(name)
|
|
|
|
|
|
|
|
@operation.headers[name]
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def attach!(signature)
|
|
|
|
|
|
|
|
signature.to_h.each { |h, v| @operation.headers[h] = v }
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Incomplete, but sufficient for FASP
|
|
|
|
# Incomplete, but sufficient for FASP
|
|
|
|
def [](field_name)
|
|
|
|
def derived(name)
|
|
|
|
return @operation.status if field_name == '@status'
|
|
|
|
case name.value
|
|
|
|
|
|
|
|
when '@status' then @operation.status
|
|
|
|
@operation.headers[field_name]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|