Class: ADIWG::Mdtranslator::Writers::Html::Html_GridRepresentation
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Html::Html_GridRepresentation
- Defined in:
- lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_GridRepresentation
constructor
A new instance of Html_GridRepresentation.
- #writeHtml(hGrid) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_GridRepresentation
Returns a new instance of Html_GridRepresentation.
18 19 20 |
# File 'lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb', line 18 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hGrid) ⇒ Object
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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb', line 22 def writeHtml(hGrid) # classes used dimensionClass = Html_Dimension.new(@html) scopeClass = Html_Scope.new(@html) # grid representation - scope hGrid[:scope].each do |scope| @html.details do @html.summary('Scope ', 'class' => 'h5') @html.section(:class => 'block') do scopeClass.writeHtml(hGrid[:scope]) end end end # grid representation - number of dimensions unless hGrid[:numberOfDimensions].nil? @html.em('Number of dimensions: ') @html.text!(hGrid[:numberOfDimensions].to_s) @html.br end # grid representation - dimension [] dimensionCount = 0 hGrid[:dimension].each do |hDimension| dimensionCount += 1 @html.details do @html.summary('Dimension '+dimensionCount.to_s, 'class' => 'h5') @html.section(:class => 'block') do dimensionClass.writeHtml(hDimension) end end end # grid representation - cell geometry unless hGrid[:cellGeometry].nil? @html.em('Cell Geometry: ') @html.text!(hGrid[:cellGeometry]) @html.br end # grid representation - transformation parameters available {Boolean} @html.em('Transformation parameters available: ') @html.text!(hGrid[:transformationParameterAvailable].to_s) end |