Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_AttributeGroup
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_AttributeGroup
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_attributeGroup.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_AttributeGroup
constructor
A new instance of Html_AttributeGroup.
- #writeHtml(hGroup) ⇒ Object
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 |