2017-09-23 04:34:07 +02:00
|
|
|
class CustomWizard::Wizard
|
|
|
|
|
2017-09-29 13:27:03 +02:00
|
|
|
attr_reader :id, :name, :steps, :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']
|
|
|
|
@steps = data['steps']
|
|
|
|
@custom = true
|
2017-09-23 04:34:07 +02:00
|
|
|
end
|
|
|
|
end
|