class ADIWG::Mdtranslator::Writers::Html::Html_TaxonomyClass
Public Class Methods
new(html)
click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_taxonomyClass.rb, line 17 def initialize(html) @html = html end
Public Instance Methods
writeHtml(hTaxon)
click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_taxonomyClass.rb, line 21 def writeHtml(hTaxon) # classes used subClass = Html_TaxonomyClass.new(@html) # taxonomic classification - id unless hTaxon[:taxonId].nil? @html.em('Taxonomic ID: ') @html.text!(hTaxon[:taxonId]) @html.br end # taxonomic classification - level unless hTaxon[:taxonRank].nil? @html.em('Taxonomic Level: ') @html.text!(hTaxon[:taxonRank]) @html.br end # taxonomic classification - name unless hTaxon[:taxonValue].nil? @html.em('Taxonomic Name: ') @html.text!(hTaxon[:taxonValue]) @html.br end # taxonomic classification - common names [] unless hTaxon[:commonNames].empty? @html.em('Common Names:') @html.ul do hTaxon[:commonNames].each do |common| @html.li(common) end end end # taxonomic classification - sub-classification unless hTaxon[:subClasses].empty? hTaxon[:subClasses].each do |hSubClass| @html.details do @html.summary('Sub-Classification', {'class' => 'h5'}) @html.section(:class => 'block') do subClass.writeHtml(hSubClass) end end end end end