Class: Protocol

Inherits:
BaseDocument show all
Defined in:
lib/almirah/doc_types/protocol.rb

Instance Attribute Summary collapse

Attributes inherited from BaseDocument

#headings, #id, #items, #path, #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.



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_itemsObject

attr_accessor :dictionary



7
8
9
# File 'lib/almirah/doc_types/protocol.rb', line 7

def controlled_items
  @controlled_items
end

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