Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Extent
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_Extent
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Extent
constructor
A new instance of Html_Extent.
- #writeHtml(hExtent) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Extent
Returns a new instance of Html_Extent.
20 21 22 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb', line 20 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hExtent) ⇒ Object
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_extent.rb', line 24 def writeHtml(hExtent) # classes used geographicClass = Html_GeographicExtent.new(@html) temporalClass = Html_TemporalExtent.new(@html) verticalClass = Html_VerticalExtent.new(@html) # extent - description unless hExtent[:description].nil? @html.em('Description: ') @html.div(:class => 'block') do @html.text!(hExtent[:description]) end end # extent - geographic extents hExtent[:geographicExtents].each do |hGeographic| @html.div do @html.div('Geographic Extent', {'class' => 'h5'}) @html.div(:class => 'block extent-geographic') do geographicClass.writeHtml(hGeographic) end end end # extent - temporal extents hExtent[:temporalExtents].each do |hTemporal| @html.div do @html.div('Temporal Extent', {'class' => 'h5'}) @html.div(:class => 'block') do temporalClass.writeHtml(hTemporal) end end end # extent - vertical extents hExtent[:verticalExtents].each do |hVertical| @html.div do @html.div('Vertical Extent', {'class' => 'h5'}) @html.div(:class => 'block') do verticalClass.writeHtml(hVertical) end end end end |