Class: LeanCms::EditableContentComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/lean_cms/editable_content_component.rb

Instance Attribute Summary collapse

Attributes inherited from BaseComponent

#page

Instance Method Summary collapse

Constructor Details

#initialize(section:, key:, tag: :span, default: nil, page: nil, **html_options) ⇒ EditableContentComponent

Returns a new instance of EditableContentComponent.



5
6
7
8
9
10
11
12
# File 'app/components/lean_cms/editable_content_component.rb', line 5

def initialize(section:, key:, tag: :span, default: nil, page: nil, **html_options)
  super(page: page)
  @section = section
  @key = key
  @tag = tag
  @default = default
  @html_options = html_options
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



3
4
5
# File 'app/components/lean_cms/editable_content_component.rb', line 3

def default
  @default
end

#html_optionsObject (readonly)

Returns the value of attribute html_options.



3
4
5
# File 'app/components/lean_cms/editable_content_component.rb', line 3

def html_options
  @html_options
end

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'app/components/lean_cms/editable_content_component.rb', line 3

def key
  @key
end

#sectionObject (readonly)

Returns the value of attribute section.



3
4
5
# File 'app/components/lean_cms/editable_content_component.rb', line 3

def section
  @section
end

#tagObject (readonly)

Returns the value of attribute tag.



3
4
5
# File 'app/components/lean_cms/editable_content_component.rb', line 3

def tag
  @tag
end