Class: Coradoc::Output::HtmlSpa
- Inherits:
-
Object
- Object
- Coradoc::Output::HtmlSpa
- Defined in:
- lib/coradoc/html/output.rb
Overview
SPA (Single Page Application) HTML output processor
Generates modern Vue.js + Tailwind CSS HTML documents from CoreModel.
Class Method Summary collapse
-
.processor_execute(input, options = {}) ⇒ Hash<String, String>
Process documents to SPA 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 SPA HTML
77 78 79 80 81 82 83 84 |
# File 'lib/coradoc/html/output.rb', line 77 def processor_execute(input, = {}) result = {} input.each do |filename, document| html = Coradoc::Html::Spa.convert(document, ) result[filename] = html end result end |
.processor_id ⇒ Symbol
Processor identifier for registration
62 63 64 |
# File 'lib/coradoc/html/output.rb', line 62 def processor_id :html_spa end |
.processor_match?(filename) ⇒ Boolean
Check if this processor matches a given filename
69 70 71 |
# File 'lib/coradoc/html/output.rb', line 69 def processor_match?(filename) %w[.html .htm].any? { |ext| filename.downcase.end_with?(ext) } end |