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

12 Zeilen
254 B
Ruby

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