0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-09-19 23:31:11 +02:00
discourse-custom-wizard/extensions/wizard_field.rb
2020-07-16 13:26:56 +10:00

30 Zeilen
Kein EOL
705 B
Ruby

module CustomWizardFieldExtension
attr_reader :label,
:description,
:image,
:key,
:min_length,
:file_types,
:format,
:limit,
:property,
:content
def initialize(attrs)
super
@attrs = attrs || {}
@description = attrs[:description]
@image = attrs[:image]
@key = attrs[:key]
@min_length = attrs[:min_length]
@file_types = attrs[:file_types]
@format = attrs[:format]
@limit = attrs[:limit]
@property = attrs[:property]
@content = attrs[:content]
end
def label
@label ||= PrettyText.cook(@attrs[:label])
end
end