Class: SiSU_HTML_Format::ParagraphNumber
- Inherits:
-
Object
- Object
- SiSU_HTML_Format::ParagraphNumber
- Defined in:
- lib/sisu/html_format.rb
Instance Method Summary collapse
- #goto ⇒ Object
-
#id ⇒ Object
w3c? “tidy” complains about numbers as identifiers ! annoying.
-
#initialize(md, ocn) ⇒ ParagraphNumber
constructor
A new instance of ParagraphNumber.
- #name ⇒ Object
- #ocn_display ⇒ Object
Constructor Details
#initialize(md, ocn) ⇒ ParagraphNumber
Returns a new instance of ParagraphNumber.
60 61 62 63 64 |
# File 'lib/sisu/html_format.rb', line 60 def initialize(md,ocn) @md,@ocn=md,ocn.to_s @ocn ||='' @make=SiSU_Env::ProcessingSettings.new(@md) end |
Instance Method Details
#goto ⇒ Object
89 90 91 92 |
# File 'lib/sisu/html_format.rb', line 89 def goto (@ocn==nil || @ocn.empty?) \ ? '' : %{<a href="##{@ocn}">} end |
#id ⇒ Object
w3c? “tidy” complains about numbers as identifiers ! annoying
85 86 87 88 |
# File 'lib/sisu/html_format.rb', line 85 def id #w3c? "tidy" complains about numbers as identifiers ! annoying (@ocn==nil || @ocn.empty?) \ ? '' : %{id="#{Mx[:ocn_id_char]}#{@ocn}"} end |
#name ⇒ Object
77 78 79 80 81 82 83 84 |
# File 'lib/sisu/html_format.rb', line 77 def name if @make.build.html_strict? \ or @ocn==(nil || @ocn.empty?) '' else %{<a name="#{@ocn}"></a>} end end |
#ocn_display ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/sisu/html_format.rb', line 65 def ocn_display if @make.build.ocn? if @ocn.to_i==0 \ or @ocn.empty? '' else %{<label class="ocn"><a href="##{@ocn}" class="lnkocn">#{@ocn}</a></label>} end else '' end end |