1
0
Fork 0
discourse-custom-wizard-unl.../lib/wizard.rb

15 Zeilen
372 B
Ruby

2017-09-23 04:34:07 +02:00
class CustomWizard::Wizard
2017-10-09 07:52:09 +02:00
attr_reader :id, :name, :steps, :background, :save_submissions, :custom
2017-09-23 04:34:07 +02:00
def initialize(data)
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']
@steps = data['steps']
@custom = true
2017-09-23 04:34:07 +02:00
end
end