Class: Coradoc::Html::Drop::RawInlineElementDrop

Inherits:
InlineElementDrop show all
Defined in:
lib/coradoc/html/drop/raw_inline_element_drop.rb

Overview

Drop for CoreModel::RawInlineElement.

Passthrough content is raw output-format markup (typically HTML) that the source author explicitly marked as “emit verbatim.” The generic InlineElementDrop escapes content; this subclass skips escaping so the rendered output mirrors the author’s intent.

The Liquid template is shared with InlineElementDrop — only the data preparation differs. InlineElementDrop is autoloaded by the Drop namespace shell (drop.rb) and is guaranteed to load before this class via DropFactory.eager_load! ordering.

Instance Attribute Summary

Attributes inherited from Base

#model

Instance Method Summary collapse

Methods inherited from InlineElementDrop

#css_class, #format_type, #href, #html_tag, #term_ref

Methods inherited from Base

#id, #initialize, #title, #to_liquid

Constructor Details

This class inherits a constructor from Coradoc::Html::Drop::Base

Instance Method Details

#template_typeObject



22
23
24
# File 'lib/coradoc/html/drop/raw_inline_element_drop.rb', line 22

def template_type
  'inline_element'
end

#textObject



18
19
20
# File 'lib/coradoc/html/drop/raw_inline_element_drop.rb', line 18

def text
  extract_text(@model.content).to_s
end