Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_Responsibility
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_Responsibility
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Responsibility
constructor
A new instance of Html_Responsibility.
- #writeHtml(hResponsibility) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Responsibility
Returns a new instance of Html_Responsibility.
17 18 19 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb', line 17 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hResponsibility) ⇒ 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 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 71 72 73 74 75 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_responsibility.rb', line 21 def writeHtml(hResponsibility) # classes used # extentClass = Html_Extent.new(@html) # responsibility - role parties hResponsibility[:parties].each do |hParty| hContact = Html_Document.getContact(hParty[:contactId]) @html.div do @html.div(hContact[:name], 'class' => 'h5') @html.div(:class => 'block') do # party - contact ID @html.em('Contact ID: ') @html.a(hContact[:contactId], 'href' => '#CID_'+hContact[:contactId]) @html.br # party - contact type unless hContact[:contactType].nil? @html.em('Contact Type: ') @html.text!(hContact[:contactType]) @html.br end if hContact[:isOrganization] hParty[:organizationMembers].each do |memberId| hMemberContact = Html_Document.getContact(memberId) @html.em('has Member: ') @html.a(hMemberContact[:name], 'href' => '#CID_'+ memberId) @html.br end else hMemberContact = Html_Document.getContact(hContact[:contactId]) unless hMemberContact[:positionName].nil? @html.em('Position Name: ') @html.text!(hMemberContact[:positionName]) @html.br end end end end end # # responsibility - role extent [] {extent} # hResponsibility[:roleExtents].each do |hExtent| # @html.div do # @html.div('Extent', {'class' => 'h5'}) # @html.div(:class => 'block') do # extentClass.writeHtml(hExtent) # end # end # end end |