Class: Protocol
- Inherits:
-
PersistentDocument
- Object
- BaseDocument
- PersistentDocument
- Protocol
- Defined in:
- lib/almirah/doc_types/protocol.rb
Instance Attribute Summary
Attributes inherited from PersistentDocument
#controlled_items, #frontmatter, #headings, #items, #path, #up_link_docs
Attributes inherited from BaseDocument
Instance Method Summary collapse
-
#initialize(fele_path) ⇒ Protocol
constructor
A new instance of Protocol.
- #to_html(nav_pane, output_file_path) ⇒ Object
Methods inherited from BaseDocument
Constructor Details
#initialize(fele_path) ⇒ Protocol
Returns a new instance of Protocol.
5 6 7 8 |
# File 'lib/almirah/doc_types/protocol.rb', line 5 def initialize(fele_path) super @id = File.basename(fele_path, File.extname(fele_path)).downcase end |
Instance Method Details
#to_html(nav_pane, output_file_path) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/almirah/doc_types/protocol.rb', line 10 def to_html(nav_pane, output_file_path) html_rows = Array.new html_rows.append('') @items.each do |item| a = item.to_html html_rows.append a end self.save_html_to_file(html_rows, nav_pane, output_file_path) end |