will return true if step passed in is the currently rendered step
# File lib/wicked/controller/concerns/steps.rb, line 21 def current_step?(step_name) return false unless current_and_given_step_exists?(step_name) step == step_name end
will return true if the step passed in has not been executed by the wizard
# File lib/wicked/controller/concerns/steps.rb, line 33 def future_step?(step_name) return false unless current_and_given_step_exists?(step_name) current_step_index < step_index_for(step_name) end
# File lib/wicked/controller/concerns/steps.rb, line 6 def jump_to(goto_step, options = {}) @skip_to = goto_step @wicked_redirect_params = options end
# File lib/wicked/controller/concerns/steps.rb, line 88 def next_step(current_step = nil) return @next_step if current_step.nil? index = steps.index(current_step) step = steps.at(index + 1) if index.present? step ||= Wicked::FINISH_STEP step end
will return true if the next step is the step passed in
# File lib/wicked/controller/concerns/steps.rb, line 45 def next_step?(step_name) return false unless current_and_given_step_exists?(step_name) (current_step_index + 1) == step_index_for(step_name) end
will return true if the step passed in has already been executed by the wizard
# File lib/wicked/controller/concerns/steps.rb, line 27 def past_step?(step_name) return false unless current_and_given_step_exists?(step_name) current_step_index > step_index_for(step_name) end
# File lib/wicked/controller/concerns/steps.rb, line 79 def previous_step(current_step = nil) return @previous_step if current_step.nil? index = steps.index(current_step) step = steps.at(index - 1) if index.present? && index != 0 step ||= steps.first step end
will return true if the last step is the step passed in
# File lib/wicked/controller/concerns/steps.rb, line 39 def previous_step?(step_name) return false unless current_and_given_step_exists?(step_name) (current_step_index - 1) == step_index_for(step_name) end
# File lib/wicked/controller/concerns/steps.rb, line 11 def skip_step(options = {}) @skip_to = @next_step @wicked_redirect_params = options end
# File lib/wicked/controller/concerns/steps.rb, line 16 def step @step end
# File lib/wicked/controller/concerns/steps.rb, line 73 def steps @wizard_steps end
Generated with the Darkfish Rdoc Generator 2.