Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-14 05:52:52 +01:00
28 Zeilen
Kein EOL
653 B
Ruby
28 Zeilen
Kein EOL
653 B
Ruby
module CustomWizardFieldExtension
|
|
attr_reader :label,
|
|
:description,
|
|
:image,
|
|
:key,
|
|
:min_length,
|
|
:file_types,
|
|
: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]
|
|
@limit = attrs[:limit]
|
|
@property = attrs[:property]
|
|
@content = attrs[:content]
|
|
end
|
|
|
|
def label
|
|
@label ||= PrettyText.cook(@attrs[:label])
|
|
end
|
|
end |