will return true if step passed in is the currently rendered step
# File lib/wicked/controller/concerns/steps.rb, line 19 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 31 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) @skip_to = goto_step end
# File lib/wicked/controller/concerns/steps.rb, line 86 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 43 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 25 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 77 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 37 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 10 def skip_step @skip_to = @next_step end
# File lib/wicked/controller/concerns/steps.rb, line 14 def step @step end
# File lib/wicked/controller/concerns/steps.rb, line 71 def steps @wizard_steps end
Generated with the Darkfish Rdoc Generator 2.