class ADIWG::Mdtranslator::Writers::Html::Html_GridRepresentation
Public Class Methods
new(html)
click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_gridRepresentation.rb, line 18 def initialize(html) @html = html end
Public Instance Methods
writeHtml(hGrid)
click to toggle source
# 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