Class: Protocol
- Inherits:
-
BaseDocument
- Object
- BaseDocument
- Protocol
- Defined in:
- lib/almirah/doc_types/protocol.rb
Instance Attribute Summary collapse
-
#controlled_items ⇒ Object
attr_accessor :dictionary.
-
#up_link_doc_id ⇒ Object
Returns the value of attribute up_link_doc_id.
Attributes inherited from BaseDocument
#headings, #id, #items, #path, #title
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.
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/almirah/doc_types/protocol.rb', line 9 def initialize(fele_path) @path = fele_path @title = "" @items = Array.new @headings = Array.new @controlled_items = Array.new #@dictionary = Hash.new @id = File.basename(fele_path, File.extname(fele_path)).downcase @up_link_doc_id = Hash.new end |
Instance Attribute Details
#controlled_items ⇒ Object
attr_accessor :dictionary
7 8 9 |
# File 'lib/almirah/doc_types/protocol.rb', line 7 def controlled_items @controlled_items end |
#up_link_doc_id ⇒ Object
Returns the value of attribute up_link_doc_id.
5 6 7 |
# File 'lib/almirah/doc_types/protocol.rb', line 5 def up_link_doc_id @up_link_doc_id end |
Instance Method Details
#to_html(nav_pane, output_file_path) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/almirah/doc_types/protocol.rb', line 22 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 |