Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_DataQuality
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_DataQuality
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_DataQuality
constructor
A new instance of Html_DataQuality.
- #writeHtml(hDataQuality) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_DataQuality
Returns a new instance of Html_DataQuality.
8 9 10 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb', line 8 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hDataQuality) ⇒ Object
12 13 14 15 16 17 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 50 51 52 53 54 55 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_dataQuality.rb', line 12 def writeHtml(hDataQuality) citationClass = Html_Citation.new(@html) scopeClass = Html_Scope.new(@html) unless hDataQuality[:scope].nil? || hDataQuality[:scope].empty? @html.div(class: 'block') do @html.div do @html.div('Scope', {'class' => 'h5'}) @html.div(class: 'block') do scopeClass.writeHtml(hDataQuality[:scope]) end end end end unless hDataQuality[:standaloneQualityReport].nil? || ( hDataQuality[:standaloneQualityReport][:abstract].nil? && hDataQuality[:standaloneQualityReport][:reportReference].nil? ) report = hDataQuality[:standaloneQualityReport] @html.div(class: 'block') do @html.div do @html.div('Standalone Quality Report', {'class' => 'h5'}) unless report[:abstract].nil? @html.div(class: 'block') do @html.em('Abstract:') @html.text!(report[:abstract]) end end unless report[:reportReference].nil? @html.div do @html.div('Report Reference', {'class' => 'h5'}) @html.div(class: 'block') do citationClass.writeHtml(report[:reportReference]) end end end end end end end |