Class: Katalyst::Content::Layout

Inherits:
Item
  • Object
show all
Defined in:
app/models/katalyst/content/layout.rb

Direct Known Subclasses

Aside, Column, Group, Section

Instance Attribute Summary

Attributes inherited from Item

#children, #depth, #index, #next_sibling, #parent, #previous_sibling

Instance Method Summary collapse

Methods inherited from Item

config, #dom_id, #heading_style_class, #item_type, #layout?, permitted_params, #show_heading?

Instance Method Details

#to_plain_textObject



6
7
8
9
10
# File 'app/models/katalyst/content/layout.rb', line 6

def to_plain_text
  return unless visible?

  [super, *children.filter_map(&:to_plain_text)].join("\n").presence
end