Class: Protocol
- Inherits:
-
PersistentDocument
- Object
- BaseDocument
- PersistentDocument
- Protocol
- Defined in:
- lib/almirah/doc_types/protocol.rb
Instance Attribute Summary collapse
-
#specifications_path ⇒ Object
Returns the value of attribute specifications_path.
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
#decisions_link, #index_link, #save_html_to_file
Constructor Details
#initialize(fele_path) ⇒ Protocol
Returns a new instance of Protocol.
7 8 9 10 11 |
# File 'lib/almirah/doc_types/protocol.rb', line 7 def initialize(fele_path) super @id = File.basename(fele_path, File.extname(fele_path)).downcase @specifications_path = './../../../specifications/' end |
Instance Attribute Details
#specifications_path ⇒ Object
Returns the value of attribute specifications_path.
5 6 7 |
# File 'lib/almirah/doc_types/protocol.rb', line 5 def specifications_path @specifications_path end |
Instance Method Details
#to_html(nav_pane, output_file_path) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/almirah/doc_types/protocol.rb', line 13 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 |