Class: SiSU_FormatShared::CSS_FormatGeneric
- Inherits:
-
Object
- Object
- SiSU_FormatShared::CSS_FormatGeneric
- Defined in:
- lib/sisu/html_lite_shared.rb
Overview
does CSS_Format in one definition, needs to be told about attrib, despite brevity of generic, easier to see structure with CSS_Format
Instance Method Summary collapse
-
#initialize(attrib = '', txt = '', id = nil, ocnd = nil, ocns = nil, lv = '', hname = nil) ⇒ CSS_FormatGeneric
constructor
A new instance of CSS_FormatGeneric.
- #para ⇒ Object
- #paragraph ⇒ Object
Constructor Details
#initialize(attrib = '', txt = '', id = nil, ocnd = nil, ocns = nil, lv = '', hname = nil) ⇒ CSS_FormatGeneric
Returns a new instance of CSS_FormatGeneric.
299 300 301 302 303 304 305 306 |
# File 'lib/sisu/html_lite_shared.rb', line 299 def initialize(attrib='',txt='',id=nil,ocnd=nil,ocns=nil,lv='',hname=nil) @tab="\t" @attrib=attrib @txt=txt @lv=lv.to_s @hname=hname.to_s @id=@ocn=id end |
Instance Method Details
#para ⇒ Object
319 320 321 |
# File 'lib/sisu/html_lite_shared.rb', line 319 def para paragraph end |
#paragraph ⇒ Object
307 308 309 310 311 312 313 314 315 316 317 318 |
# File 'lib/sisu/html_lite_shared.rb', line 307 def paragraph attrib=%{class="#{@attrib}" } if @ocn id=%{id="#{Mx[:ocn_id_char]}#{@ocn}" } type=%{type="substantive" } else id='' type=%{type="comment" } end header=%{header="#{@hname}" } if @hname %{<p #{attrib}#{type}#{header}>#{@txt}</p>\n} #<< "\n" end |