0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-09 20:02:54 +01:00
discourse-custom-wizard/lib/template.rb
Angus McLeod 897cc0b60e various
2017-10-15 11:58:22 +08:00

14 Zeilen
435 B
Ruby

class CustomWizard::Template
attr_reader :id, :name, :steps, :background, :save_submissions, :multiple_submissions, :custom
def initialize(data)
data = data.is_a?(String) ? ::JSON.parse(data) : data
@id = data['id']
@name = data['name']
@background = data['background']
@save_submissions = data['save_submissions']
@multiple_submissions = data['multiple_submissions']
@steps = data['steps']
end
end