Class: Protocol

Inherits:
PersistentDocument show all
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

#dom, #headings, #id, #title

Instance Method Summary collapse

Methods inherited from BaseDocument

#save_html_to_file

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