Module: Wicked::Controller::Concerns::Steps

Extended by:
ActiveSupport::Concern
Included in:
Wizard
Defined in:
lib/wicked/controller/concerns/steps.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#jump_to(goto_step) ⇒ Object



5
6
7
# File 'lib/wicked/controller/concerns/steps.rb', line 5

def jump_to(goto_step)
  @skip_to = goto_step
end

#next_step(current_step) ⇒ Object



33
34
35
36
37
38
# File 'lib/wicked/controller/concerns/steps.rb', line 33

def next_step(current_step)
  index = steps.index(current_step)
  step = steps.at(index + 1) if index.present?
  step ||= :finish
  step
end

#skip_stepObject



9
10
11
# File 'lib/wicked/controller/concerns/steps.rb', line 9

def skip_step
  @skip_to = @next_step
end

#stepObject



13
14
15
# File 'lib/wicked/controller/concerns/steps.rb', line 13

def step
  @step
end

#stepsObject



28
29
30
# File 'lib/wicked/controller/concerns/steps.rb', line 28

def steps
  self.class.steps
end