Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_VectorRepresentation
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_VectorRepresentation
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorRepresentation.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_VectorRepresentation
constructor
A new instance of Html_VectorRepresentation.
- #writeHtml(hVector) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_VectorRepresentation
Returns a new instance of Html_VectorRepresentation.
18 19 20 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorRepresentation.rb', line 18 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hVector) ⇒ 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 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_vectorRepresentation.rb', line 22 def writeHtml(hVector) # classes used objectClass = Html_VectorObject.new(@html) scopeClass = Html_Scope.new(@html) # vector representation - scope hVector[:scope].each do |scope| @html.div do @html.div('Scope ', 'class' => 'h5') @html.div(:class => 'block') do scopeClass.writeHtml(hVector[:scope]) end end end # vector representation - topology level unless hVector[:topologyLevel].nil? @html.em('Topology Level: ') @html.text!(hVector[:topologyLevel]) @html.br end # vector representation - vector object [] hVector[:vectorObject].each do |hObject| @html.div do @html.div('Vector Object ', 'class' => 'h5') @html.div(:class => 'block') do objectClass.writeHtml(hObject) end end end end |