Class: UniversalRenderer::SSR::Response
- Inherits:
-
Struct
- Object
- Struct
- UniversalRenderer::SSR::Response
- Defined in:
- lib/universal_renderer/ssr/response.rb
Overview
Lightweight value object representing the payload returned by the
Node.js SSR service. Using a Struct keeps the data immutable-ish while
still allowing hash-like access (e.g. response[:head]).
The contract between the Ruby Gem and the Node service guarantees that
at minimum the head and body keys are present. Additional keys are
accepted but ignored (see Client::Base).
Instance Attribute Summary collapse
-
#body ⇒ String?
Raw body HTML snippet produced by the renderer.
-
#body_attrs ⇒ Hash?
A hash of attributes that should be applied to the
tag. -
#head ⇒ String?
Raw
HTML snippet produced by the renderer.
Instance Attribute Details
#body ⇒ String?
Returns Raw body HTML snippet produced by the renderer.
17 |
# File 'lib/universal_renderer/ssr/response.rb', line 17 Response = Struct.new(:head, :body, :body_attrs, keyword_init: true) |
#body_attrs ⇒ Hash?
Returns A hash of attributes that should be applied to the
tag.
17 |
# File 'lib/universal_renderer/ssr/response.rb', line 17 Response = Struct.new(:head, :body, :body_attrs, keyword_init: true) |
#head ⇒ String?
Returns Raw
HTML snippet produced by the renderer.
17 |
# File 'lib/universal_renderer/ssr/response.rb', line 17 Response = Struct.new(:head, :body, :body_attrs, keyword_init: true) |