Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Measure

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/simple_html/sections/html_measure.rb

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_Measure

Returns a new instance of Html_Measure.



14
15
16
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_measure.rb', line 14

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hMeasure) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_measure.rb', line 18

def writeHtml(hMeasure)

   # measure - type
   unless hMeasure[:type].nil?
      @html.em('Type: ')
      @html.text!(hMeasure[:type])
      @html.br
   end

   # measure - value
   unless hMeasure[:value].nil?
      @html.em('Value: ')
      @html.text!(hMeasure[:value].to_s)
      @html.br
   end

   # measure - unit of measure
   unless hMeasure[:unitOfMeasure].nil?
      @html.em('Units: ')
      @html.text!(hMeasure[:unitOfMeasure])
      @html.br
   end

end