Class: SiSU_AO_DocumentStructure::ObjectLayout
- Inherits:
-
Object
- Object
- SiSU_AO_DocumentStructure::ObjectLayout
- Defined in:
- lib/sisu/ao_doc_objects.rb
Instance Attribute Summary collapse
-
#attr ⇒ Object
Returns the value of attribute attr.
-
#from ⇒ Object
Returns the value of attribute from.
-
#is ⇒ Object
Returns the value of attribute is.
-
#is_for ⇒ Object
Returns the value of attribute is_for.
-
#num ⇒ Object
Returns the value of attribute num.
-
#obj ⇒ Object
Returns the value of attribute obj.
-
#of ⇒ Object
Returns the value of attribute of.
-
#sym ⇒ Object
Returns the value of attribute sym.
-
#tmp ⇒ Object
Returns the value of attribute tmp.
Instance Method Summary collapse
-
#break(h, f = nil) ⇒ Object
decide how to deal with.
-
#initialize ⇒ ObjectLayout
constructor
A new instance of ObjectLayout.
-
#insert(h, o = nil) ⇒ Object
decide how to deal with, could mimic paragraph?.
-
#open_close(h, o = nil) ⇒ Object
useful for poem & quote.
Constructor Details
#initialize ⇒ ObjectLayout
Returns a new instance of ObjectLayout.
513 514 515 516 |
# File 'lib/sisu/ao_doc_objects.rb', line 513 def initialize @of=:layout @is=@is_for=@obj=@from=@tmp=@num=nil end |
Instance Attribute Details
#attr ⇒ Object
Returns the value of attribute attr.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def attr @attr end |
#from ⇒ Object
Returns the value of attribute from.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def from @from end |
#is ⇒ Object
Returns the value of attribute is.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def is @is end |
#is_for ⇒ Object
Returns the value of attribute is_for.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def is_for @is_for end |
#num ⇒ Object
Returns the value of attribute num.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def num @num end |
#obj ⇒ Object
Returns the value of attribute obj.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def obj @obj end |
#of ⇒ Object
Returns the value of attribute of.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def of @of end |
#sym ⇒ Object
Returns the value of attribute sym.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def sym @sym end |
#tmp ⇒ Object
Returns the value of attribute tmp.
512 513 514 |
# File 'lib/sisu/ao_doc_objects.rb', line 512 def tmp @tmp end |
Instance Method Details
#break(h, f = nil) ⇒ Object
decide how to deal with
517 518 519 520 521 522 523 524 525 |
# File 'lib/sisu/ao_doc_objects.rb', line 517 def break(h,f=nil) #decide how to deal with of= @of #Symbol, classification - group is= :break #Symbol, classification - specific type obj= h[:obj] #String, text content from= f tmp= h[:tmp] #available for processing, empty after use @of,@is,@obj,@from,@tmp=of,is,obj,from,tmp self end |
#insert(h, o = nil) ⇒ Object
decide how to deal with, could mimic paragraph?
526 527 528 529 530 531 532 533 |
# File 'lib/sisu/ao_doc_objects.rb', line 526 def insert(h,o=nil) #decide how to deal with, could mimic paragraph? of= @of #Symbol, classification - group is= :insert #Symbol, classification - specific type obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use @of,@is,@obj,@tmp=of,is,obj,tmp self end |
#open_close(h, o = nil) ⇒ Object
useful for poem & quote
534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/sisu/ao_doc_objects.rb', line 534 def open_close(h,o=nil) #useful for poem & quote of= @of #Symbol, classification - group is= :open_close_tags #Symbol, classification - specific type is_for= h[:is_for] || ((defined? o.is_for) ? o.is_for : nil) #String, text content obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content sym= h[:sym] || ((defined? o.sym) ? o.sym : nil) #Symbol tag_open, tag_close attr= h[:attr] || ((defined? o.attr) ? o.attr : nil) #String, text content tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use num= h[:num] || ((defined? o.num) ? o.num : nil) @of,@is,@is_for,@obj,@sym,@attr,@tmp,@num= of, is, is_for, obj, sym, attr, tmp, num self end |