Class: Super::Action
- Inherits:
-
Object
- Object
- Super::Action
- Defined in:
- lib/super/action.rb,
lib/super/action/step.rb
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(steps:, page:) ⇒ Action
constructor
A new instance of Action.
- #steps ⇒ Object
Constructor Details
#initialize(steps:, page:) ⇒ Action
3 4 5 6 |
# File 'lib/super/action.rb', line 3 def initialize(steps:, page:) @steps = steps @page = page end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
8 9 10 |
# File 'lib/super/action.rb', line 8 def page @page end |
Class Method Details
.steps ⇒ Object
3 4 5 |
# File 'lib/super/action/step.rb', line 3 def self.steps @steps ||= {} end |
Instance Method Details
#steps ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/super/action.rb', line 10 def steps resolved_steps = @steps.map do |step| if step.respond_to?(:call) step elsif self.class.steps.key?(step) self.class.steps[step] end end resolved_steps.compact end |