Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Lineage
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_Lineage
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_lineage.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Lineage
constructor
A new instance of Html_Lineage.
- #writeHtml(hLineage) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Lineage
Returns a new instance of Html_Lineage.
21 22 23 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_lineage.rb', line 21 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hLineage) ⇒ Object
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 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 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_lineage.rb', line 25 def writeHtml(hLineage) # classes used scopeClass = Html_Scope.new(@html) citationClass = Html_Citation.new(@html) stepClass = Html_ProcessStep.new(@html) sourceClass = Html_Source.new(@html) # lineage - statement unless hLineage[:statement].nil? @html.em('Statement: ') @html.div(:class => 'block') do @html.text!(hLineage[:statement]) end end # lineage - scope unless hLineage[:resourceScope].empty? @html.div do @html.div('Scope', {'class' => 'h5'}) @html.div(:class => 'block') do scopeClass.writeHtml(hLineage[:resourceScope]) end end end # lineage - citation hLineage[:lineageCitation].each do |hCitation| @html.div do @html.div('Citation', {'class' => 'h5'}) @html.div(:class => 'block') do citationClass.writeHtml(hCitation) end end end # lineage - data sources hLineage[:dataSources].each do |hsource| @html.div do @html.div('Data Source', {'class' => 'h5'}) @html.div(:class => 'block') do sourceClass.writeHtml(hsource) end end end # lineage - process steps hLineage[:processSteps].each do |hStep| @html.div do @html.div('Process Step', {'class' => 'h5'}) @html.div(:class => 'block') do stepClass.writeHtml(hStep) end end end end |