Module: ActsAsWizard::Base

Defined in:
app/models/concerns/acts_as_wizard.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_wizard(steps) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
# File 'app/models/concerns/acts_as_wizard.rb', line 11

def acts_as_wizard(steps)
  raise 'acts_as_wizard expected a Hash of steps' unless steps.kind_of?(Hash)

  unless steps.all? { |k, v| k.kind_of?(Symbol) && v.kind_of?(String) }
    raise 'acts_as_wizard expected a Hash of symbol => String steps'
  end

  @acts_as_wizard_options = {steps: steps}

  include ::ActsAsWizard
end