Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_OnlineResource

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

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_OnlineResource

Returns a new instance of Html_OnlineResource.



15
16
17
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_onlineResource.rb', line 15

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hOlRes) ⇒ Object



19
20
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
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_onlineResource.rb', line 19

def writeHtml(hOlRes)

   # online resource - URI
   @html.em('URI: ')
   @html.a(hOlRes[:olResURI], 'href' => hOlRes[:olResURI])
   @html.br

   # online resource - name
   unless hOlRes[:olResName].nil?
      @html.em('Name: ')
      @html.text!(hOlRes[:olResName])
      @html.br
   end

   # online resource - description
   unless hOlRes[:olResDesc].nil?
      @html.em('Description: ')
      @html.text!(hOlRes[:olResDesc])
      @html.br
   end

   # online resource - function
   unless hOlRes[:olResFunction].nil?
      @html.em('Function: ')
      @html.text!(hOlRes[:olResFunction])
      @html.br
   end

   # online resource - application profile
   unless hOlRes[:olResApplicationProfile].nil?
      @html.em('Application Profile: ')
      @html.text!(hOlRes[:olResApplicationProfile])
      @html.br
   end

   # online resource - protocol
   unless hOlRes[:olResProtocol].nil?
      @html.em('Protocol: ')
      @html.text!(hOlRes[:olResProtocol])
      @html.br
   end

   # online resource - protocol request
   unless hOlRes[:olResProtocolRequest].nil?
      @html.em('Protocol Request: ')
      @html.text!(hOlRes[:olResProtocolRequest])
      @html.br
   end

end