Class: Docbook::Mirror::Handlers::Callout

Inherits:
Object
  • Object
show all
Defined in:
lib/docbook/mirror/handlers/callout.rb

Class Method Summary collapse

Class Method Details

.list(element, context:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/docbook/mirror/handlers/callout.rb', line 7

def self.list(element, context:)
  attrs = {
    xml_id: element.xml_id,
    title: context.resolve_title(element),
  }.compact
  callouts = element.callout.to_a.filter_map do |c|
    callout(c, context)
  end
  Node::CalloutList.new(attrs: attrs, content: callouts)
end