2017-09-23 04:34:07 +02:00
|
|
|
class CustomWizard::Wizard
|
|
|
|
|
2017-10-13 15:02:34 +02:00
|
|
|
attr_reader :id, :name, :steps, :background, :save_submissions, :multiple_submissions, :custom
|
2017-09-23 04:34:07 +02:00
|
|
|
|
|
|
|
def initialize(data)
|
2017-09-29 13:27:03 +02:00
|
|
|
data = data.is_a?(String) ? ::JSON.parse(data) : data
|
|
|
|
@id = data['id']
|
|
|
|
@name = data['name']
|
2017-10-09 07:52:09 +02:00
|
|
|
@background = data['background']
|
|
|
|
@save_submissions = data['save_submissions']
|
2017-10-13 15:02:34 +02:00
|
|
|
@multiple_submissions = data['multiple_submissions']
|
2017-09-29 13:27:03 +02:00
|
|
|
@steps = data['steps']
|
|
|
|
@custom = true
|
2017-09-23 04:34:07 +02:00
|
|
|
end
|
|
|
|
end
|