Class: Linzer::Message::Adapter::Rack::Response
- Includes:
- Common
- Defined in:
- lib/linzer/message/adapter/rack/response.rb
Instance Method Summary collapse
- #attach!(signature) ⇒ Object
- #headers ⇒ Object
-
#initialize(operation, **options) ⇒ Response
constructor
A new instance of Response.
Methods inherited from Abstract
#[], #attached_request?, #field?, #request?, #response?
Constructor Details
#initialize(operation, **options) ⇒ Response
Returns a new instance of Response.
10 11 12 13 14 15 16 17 |
# File 'lib/linzer/message/adapter/rack/response.rb', line 10 def initialize(operation, **) @operation = operation validate attached_request = [:attached_request] @attached_request = attached_request ? Message.new(attached_request) : nil validate_attached_request @attached_request if @attached_request freeze end |
Instance Method Details
#attach!(signature) ⇒ Object
23 24 25 26 |
# File 'lib/linzer/message/adapter/rack/response.rb', line 23 def attach!(signature) signature.to_h.each { |h, v| @operation[h] = v } @operation end |
#headers ⇒ Object
19 20 21 |
# File 'lib/linzer/message/adapter/rack/response.rb', line 19 def headers @operation.headers end |