Class: Playbook::PbSectionSeparator::SectionSeparator
Constant Summary
collapse
- PROPS =
%i[configured_classname
configured_data
configured_id
configured_text].freeze
Instance Method Summary
collapse
#adjusted_value, #aria, #classname, #concat_value, #data, #default_value, #false_value, #id, #is_boolean?, #is_integer?, #is_set?, #is_string?, #is_true?, #merge_value, #one_of?, #one_of_value, #true_value
Constructor Details
#initialize(classname: default_configuration, data: default_configuration, id: default_configuration, text: default_configuration) ⇒ SectionSeparator
Returns a new instance of SectionSeparator.
11
12
13
14
15
16
17
18
19
|
# File 'app/pb_kits/playbook/pb_section_separator/section_separator.rb', line 11
def initialize(classname: default_configuration,
data: default_configuration,
id: default_configuration,
text: default_configuration)
self.configured_classname = classname
self.configured_data = data
self.configured_id = id
self.configured_text = text
end
|
Instance Method Details
#kit_class ⇒ Object
28
29
30
|
# File 'app/pb_kits/playbook/pb_section_separator/section_separator.rb', line 28
def kit_class
"pb_section_separator_kit"
end
|
#text ⇒ Object
21
22
23
24
25
26
|
# File 'app/pb_kits/playbook/pb_section_separator/section_separator.rb', line 21
def text
if is_set? configured_text
pb_text = Playbook::PbCaption::Caption.new(text: configured_text)
ApplicationController.renderer.render(partial: pb_text, as: :object)
end
end
|
#to_partial_path ⇒ Object
32
33
34
|
# File 'app/pb_kits/playbook/pb_section_separator/section_separator.rb', line 32
def to_partial_path
"pb_section_separator/section_separator"
end
|