Module: Coradoc::Mirror::Handlers::GenericBlock
- Defined in:
- lib/coradoc/mirror/handlers/generic_block.rb
Class Method Summary collapse
Class Method Details
.call(element, context:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/coradoc/mirror/handlers/generic_block.rb', line 7 def self.call(element, context:) semantic_type = element.resolve_semantic_type content = context.extract_content(element) return nil if content.empty? Node::GenericBlock.new( attrs: Node::GenericBlock::Attrs.new( id: element.id, title: element.title, semantic_type: semantic_type&.to_s ), content: content ) end |