Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_DataDictionary
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_DataDictionary
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_DataDictionary
constructor
A new instance of Html_DataDictionary.
- #writeHtml(hDictionary) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_DataDictionary
Returns a new instance of Html_DataDictionary.
23 24 25 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb', line 23 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hDictionary) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataDictionary.rb', line 27 def writeHtml(hDictionary) # classes used citationClass = Html_Citation.new(@html) localeClass = Html_Locale.new(@html) responsibilityClass = Html_Responsibility.new(@html) domainClass = Html_Domain.new(@html) entityClass = Html_Entity.new(@html) # dictionary - description unless hDictionary[:description].nil? @html.em('Dictionary Description:') @html.div(:class => 'block') do @html.text!(hDictionary[:description]) end end # dictionary - subjects [] hDictionary[:subjects].each do |subject| @html.em('Subject: ') @html.text!(subject) @html.br end # dictionary - domains [] {domain} unless hDictionary[:domains].empty? @html.div do @html.div('Domains', {'class' => 'h5'}) @html.div(:class => 'block') do domainClass.writeHtml(hDictionary[:domains]) end end end # dictionary - entities [] {entity} unless hDictionary[:entities].empty? @html.div do @html.div('Entities', {'class' => 'h5'}) @html.div(:class => 'block') do entityClass.writeHtml(hDictionary[:entities]) end end end # dictionary - citation {citation} unless hDictionary[:citation].empty? @html.div do @html.div('Citation', {'class' => 'h5'}) @html.div(:class => 'block') do citationClass.writeHtml(hDictionary[:citation]) end end end # dictionary - locales {locale} hDictionary[:locales].each do |hLocale| @html.div do @html.div('Locale', {'class' => 'h5'}) @html.div(:class => 'block') do localeClass.writeHtml(hLocale) end end end # dictionary - responsible party {responsibility} unless hDictionary[:responsibleParty].empty? @html.div do @html.div(hDictionary[:responsibleParty][:roleName], {'class' => 'h5'}) @html.div(:class => 'block') do responsibilityClass.writeHtml(hDictionary[:responsibleParty]) end end end # dictionary - recommended uses [] hDictionary[:recommendedUses].each do |use| @html.em('Recommended Use: ') @html.text!(use) @html.br end # dictionary - dictionary functional language unless hDictionary[:dictionaryFunctionalLanguage].nil? @html.em('Dictionary Functional Language: ') @html.text!(hDictionary[:dictionaryFunctionalLanguage]) @html.br end # dictionary - included with dataset {Boolean} @html.em('Dictionary Included with Dataset?: ') @html.text!(hDictionary[:includedWithDataset].to_s) @html.br end |