Class: Riddler::UseCases::PreviewStep
- Inherits:
-
Object
- Object
- Riddler::UseCases::PreviewStep
- Defined in:
- lib/riddler/use_cases/preview_step.rb
Instance Attribute Summary collapse
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Instance Method Summary collapse
- #context ⇒ Object
-
#initialize(definition, params: {}, headers: {}) ⇒ PreviewStep
constructor
A new instance of PreviewStep.
- #process ⇒ Object
Constructor Details
#initialize(definition, params: {}, headers: {}) ⇒ PreviewStep
Returns a new instance of PreviewStep.
6 7 8 9 10 11 |
# File 'lib/riddler/use_cases/preview_step.rb', line 6 def initialize definition, params: {}, headers: {} @definition = definition @params = params @headers = headers @step = ::Riddler::Step.for definition, context end |
Instance Attribute Details
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
4 5 6 |
# File 'lib/riddler/use_cases/preview_step.rb', line 4 def definition @definition end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/riddler/use_cases/preview_step.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_step.rb', line 4 def params @params end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
4 5 6 |
# File 'lib/riddler/use_cases/preview_step.rb', line 4 def step @step end |
Instance Method Details
#context ⇒ Object
13 14 15 |
# File 'lib/riddler/use_cases/preview_step.rb', line 13 def context @context ||= generate_context end |
#process ⇒ Object
17 18 19 |
# File 'lib/riddler/use_cases/preview_step.rb', line 17 def process step.to_hash end |