Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 12:22:54 +01:00
31 Zeilen
Kein EOL
721 B
Ruby
31 Zeilen
Kein EOL
721 B
Ruby
module CustomWizardFieldExtension
|
|
attr_reader :raw,
|
|
:label,
|
|
:description,
|
|
:image,
|
|
:key,
|
|
:min_length,
|
|
:file_types,
|
|
:format,
|
|
:limit,
|
|
:property,
|
|
:content
|
|
|
|
def initialize(attrs)
|
|
super
|
|
@raw = 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(@raw[:label])
|
|
end
|
|
end |