Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_AttributeGroup

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

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_AttributeGroup

Returns a new instance of Html_AttributeGroup.



17
18
19
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb', line 17

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hGroup) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb', line 21

def writeHtml(hGroup)

   # classes used
   attributeClass = Html_Attribute.new(@html)

   # attribute group - content type [] {CoverageContentTypeCode}
   hGroup[:attributeContentTypes].each do |type|
      @html.em('Content Type: ')
      @html.text!(type)
      @html.br
   end

   # attribute group - attribute [] {attribute}
   counter = 0
   hGroup[:attributes].each do |hAttribute|
      @html.div do
         counter += 1
         @html.div('Attribute '+counter.to_s, {'class' => 'h5'})
         @html.div(:class => 'block') do
            attributeClass.writeHtml(hAttribute)
         end
      end
   end

end