Class: ADIWG::Mdtranslator::Writers::Html::Html_Identifier
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Html::Html_Identifier
- Defined in:
- lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_Identifier
constructor
A new instance of Html_Identifier.
- #writeHtml(hIdentifier) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_Identifier
Returns a new instance of Html_Identifier.
20 21 22 |
# File 'lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb', line 20 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hIdentifier) ⇒ Object
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/html/sections/html_identifier.rb', line 24 def writeHtml(hIdentifier) # classes used citationClass = Html_Citation.new(@html) # identifier - identifier unless hIdentifier[:identifier].nil? @html.em('Identifier:') @html.text!(hIdentifier[:identifier]) @html.br end # identifier - namespace unless hIdentifier[:namespace].nil? @html.em(' Namespace:') @html.text!(hIdentifier[:namespace]) @html.br end # identifier - version unless hIdentifier[:version].nil? @html.em(' Version:') @html.text!(hIdentifier[:version]) @html.br end # identifier - name (only in spatial reference system projection) unless hIdentifier[:name].nil? @html.em(' Name:') @html.text!(hIdentifier[:name]) @html.br end # identifier - description unless hIdentifier[:description].nil? @html.em(' Description:') @html.section(:class => 'block') do @html.text!(hIdentifier[:description]) end end # identifier - authority {citation} unless hIdentifier[:citation].empty? @html.details do @html.summary('Authority', {'id' => 'metadata-identifier', 'class' => 'h5'}) @html.section(:class => 'block') do citationClass.writeHtml(hIdentifier[:citation]) end end end end |