Class: Plutonium::Wizard::ReviewStep
- Defined in:
- lib/plutonium/wizard/review_step.rb
Overview
The built-in terminal review step (§2.5). Declares no fields of its own;
auto-summarizes collected data and gates Finish → execute. Must be the
last declared step.
Defined Under Namespace
Classes: EmptyFields
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Attributes inherited from Step
#condition, #description, #fields, #key, #label, #on_rollback, #on_submit, #using_spec
Instance Method Summary collapse
-
#header? ⇒ Boolean
Whether the step-header section (label + prompt) renders above the review body (see the
review header:macro). -
#initialize(key: :review, label: "Review", description: nil, condition: nil, summary: true, header: true, block: nil) ⇒ ReviewStep
constructor
A new instance of ReviewStep.
- #review? ⇒ Boolean
-
#summary? ⇒ Boolean
Whether the auto-summary of completed steps renders in the COMPLETE state (see the
review summary:macro).
Methods inherited from Step
#attribute_options, #attribute_schema, #form_layout, #imported_form_validators, #imported_validate_fn, #inputs, #structured_inputs, #validations
Constructor Details
#initialize(key: :review, label: "Review", description: nil, condition: nil, summary: true, header: true, block: nil) ⇒ ReviewStep
Returns a new instance of ReviewStep.
30 31 32 33 34 35 |
# File 'lib/plutonium/wizard/review_step.rb', line 30 def initialize(key: :review, label: "Review", description: nil, condition: nil, summary: true, header: true, block: nil) super(key:, label:, description:, condition:, fields: EmptyFields.new) @summary = summary @header = header @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
28 29 30 |
# File 'lib/plutonium/wizard/review_step.rb', line 28 def block @block end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
28 29 30 |
# File 'lib/plutonium/wizard/review_step.rb', line 28 def header @header end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
28 29 30 |
# File 'lib/plutonium/wizard/review_step.rb', line 28 def summary @summary end |
Instance Method Details
#header? ⇒ Boolean
Whether the step-header section (label + prompt) renders above the review
body (see the review header: macro).
45 |
# File 'lib/plutonium/wizard/review_step.rb', line 45 def header? = @header |
#review? ⇒ Boolean
37 |
# File 'lib/plutonium/wizard/review_step.rb', line 37 def review? = true |
#summary? ⇒ Boolean
Whether the auto-summary of completed steps renders in the COMPLETE state
(see the review summary: macro). Always true in the incomplete state.
41 |
# File 'lib/plutonium/wizard/review_step.rb', line 41 def summary? = @summary |