Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Distribution
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_Distribution
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Distribution
constructor
A new instance of Html_Distribution.
- #writeHtml(hDistribution) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Distribution
17 18 19 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb', line 17 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hDistribution) ⇒ Object
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 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_distribution.rb', line 21 def writeHtml(hDistribution) # classes used distributorClass = Html_Distributor.new(@html) # distribution - description unless hDistribution[:description].nil? @html.em('Description:') @html.div(:class => 'block') do @html.text!(hDistribution[:description]) end end # distribution - liability statement unless hDistribution[:liabilityStatement].nil? @html.em('Liability Statement:') @html.div(:class => 'block') do @html.text!(hDistribution[:liabilityStatement]) end end # distribution - distributor [] {distributor} hDistribution[:distributor].each do |hDistributor| @html.div do @html.div('Distributor', {'class' => 'h5'}) @html.div(:class => 'block') do distributorClass.writeHtml(hDistributor) end end end end |