0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-02 19:37:01 +01:00
discourse-custom-wizard/extensions/wizard_field.rb

30 Zeilen
705 B
Ruby

2019-12-05 19:05:21 +11:00
module CustomWizardFieldExtension
attr_reader :label,
:description,
:image,
:key,
:min_length,
:file_types,
2020-07-16 13:26:56 +10:00
:format,
2019-12-05 19:05:21 +11:00
:limit,
2020-03-24 20:35:46 +11:00
:property,
2020-03-30 17:16:03 +11:00
:content
2019-12-05 19:05:21 +11:00
def initialize(attrs)
2020-04-29 12:28:57 +10:00
super
2019-12-05 19:05:21 +11:00
@attrs = attrs || {}
@description = attrs[:description]
@image = attrs[:image]
@key = attrs[:key]
@min_length = attrs[:min_length]
@file_types = attrs[:file_types]
2020-07-16 13:26:56 +10:00
@format = attrs[:format]
2019-12-05 19:05:21 +11:00
@limit = attrs[:limit]
@property = attrs[:property]
2020-03-30 17:16:03 +11:00
@content = attrs[:content]
2019-12-05 19:05:21 +11:00
end
def label
@label ||= PrettyText.cook(@attrs[:label])
end
end