Class: ViewComponentReducible::Adapter::Base
- Inherits:
-
Object
- Object
- ViewComponentReducible::Adapter::Base
- Defined in:
- lib/view_component_reducible/adapter/base.rb
Overview
Base adapter interface for envelope serialization.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#dump(envelope, request:) ⇒ String
Encode envelope to a client-safe token.
-
#initialize(secret:, **_kwargs) ⇒ Base
constructor
A new instance of Base.
-
#load(request:) ⇒ Hash
Load envelope from a request.
Constructor Details
#initialize(secret:, **_kwargs) ⇒ Base
Returns a new instance of Base.
14 15 16 |
# File 'lib/view_component_reducible/adapter/base.rb', line 14 def initialize(secret:, **_kwargs) @secret = secret end |
Class Method Details
.state_param_name ⇒ String
8 9 10 |
# File 'lib/view_component_reducible/adapter/base.rb', line 8 def self.state_param_name 'vcr_state' end |
Instance Method Details
#dump(envelope, request:) ⇒ String
Encode envelope to a client-safe token.
22 23 24 |
# File 'lib/view_component_reducible/adapter/base.rb', line 22 def dump(envelope, request:) raise NotImplementedError end |
#load(request:) ⇒ Hash
Load envelope from a request.
29 30 31 |
# File 'lib/view_component_reducible/adapter/base.rb', line 29 def load(request:) raise NotImplementedError end |