Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_EntityForeignKey

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityForeignKey.rb

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_EntityForeignKey

Returns a new instance of Html_EntityForeignKey.



14
15
16
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityForeignKey.rb', line 14

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hKey) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_entityForeignKey.rb', line 18

def writeHtml(hKey)

   # foreign key - attributes []
   unless hKey[:fkLocalAttributes].empty?
      @html.em('Local Attribute(s):')
      @html.div(:class => 'block') do
         hKey[:fkLocalAttributes].each do |attribute|
            @html.text!(attribute)
            @html.br
         end
      end
   end

   # foreign key - referenced entity
   unless hKey[:fkReferencedEntity].nil?
      @html.em('Referenced Entity Code: ')
      @html.text!(hKey[:fkReferencedEntity])
      @html.br
   end

   # foreign key - referenced attributes []
   unless hKey[:fkReferencedAttributes].empty?
      @html.em('Referenced Attribute(s):')
      @html.div(:class => 'block') do
         hKey[:fkReferencedAttributes].each do |attribute|
            @html.text!(attribute)
            @html.br
         end
      end
   end

end