Class: Riddler::UseCases::PreviewContext
- Inherits:
-
Object
- Object
- Riddler::UseCases::PreviewContext
- Defined in:
- lib/riddler/use_cases/preview_context.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(params: {}, headers: {}) ⇒ PreviewContext
constructor
A new instance of PreviewContext.
- #process ⇒ Object
Constructor Details
#initialize(params: {}, headers: {}) ⇒ PreviewContext
Returns a new instance of PreviewContext.
6 7 8 9 |
# File 'lib/riddler/use_cases/preview_context.rb', line 6 def initialize params: {}, headers: {} @params = params @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/riddler/use_cases/preview_context.rb', line 4 def headers @headers end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/riddler/use_cases/preview_context.rb', line 4 def params @params end |
Instance Method Details
#context ⇒ Object
11 12 13 |
# File 'lib/riddler/use_cases/preview_context.rb', line 11 def context @context ||= generate_context end |
#process ⇒ Object
15 16 17 |
# File 'lib/riddler/use_cases/preview_context.rb', line 15 def process context.to_hash end |