Class: Coradoc::Output::HtmlStatic
- Inherits:
-
Object
- Object
- Coradoc::Output::HtmlStatic
- Defined in:
- lib/coradoc/html/output.rb
Overview
Static HTML output processor
Generates static HTML documents from CoreModel using the classic rendering approach without JavaScript frameworks.
Class Method Summary collapse
-
.processor_execute(input, options = {}) ⇒ Hash<String, String>
Process documents to static HTML.
-
.processor_id ⇒ Symbol
Processor identifier for registration.
-
.processor_match?(filename) ⇒ Boolean
Check if this processor matches a given filename.
Class Method Details
.processor_execute(input, options = {}) ⇒ Hash<String, String>
Process documents to static HTML
37 38 39 40 41 42 43 44 |
# File 'lib/coradoc/html/output.rb', line 37 def processor_execute(input, = {}) result = {} input.each do |filename, document| html = Coradoc::Html::Static.convert(document, ) result[filename] = html end result end |
.processor_id ⇒ Symbol
Processor identifier for registration
22 23 24 |
# File 'lib/coradoc/html/output.rb', line 22 def processor_id :html_static end |
.processor_match?(filename) ⇒ Boolean
Check if this processor matches a given filename
29 30 31 |
# File 'lib/coradoc/html/output.rb', line 29 def processor_match?(filename) %w[.html .htm].any? { |ext| filename.downcase.end_with?(ext) } end |