Class: SiSU_AO_DocumentStructure::ObjectTable

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/ao_doc_objects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectTable

Returns a new instance of ObjectTable.



386
387
388
389
390
# File 'lib/sisu/ao_doc_objects.rb', line 386

def initialize
  @of=:block
  @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@num,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@num=@digest=@tmp=nil
  @tags=[]
end

Instance Attribute Details

#colsObject

Returns the value of attribute cols.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def cols
  @cols
end

#digestObject

Returns the value of attribute digest.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def digest
  @digest
end

#hangObject

Returns the value of attribute hang.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def hang
  @hang
end

#head_Object

Returns the value of attribute head_.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def head_
  @head_
end

#idxObject

Returns the value of attribute idx.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def idx
  @idx
end

#indentObject

Returns the value of attribute indent.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def indent
  @indent
end

#isObject

Returns the value of attribute is.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def is
  @is
end

#lvObject

Returns the value of attribute lv.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def lv
  @lv
end

#nameObject

Returns the value of attribute name.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def name
  @name
end

#note_Object

Returns the value of attribute note_.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def note_
  @note_
end

#numObject

Returns the value of attribute num.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def num
  @num
end

#objObject

Returns the value of attribute obj.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def obj
  @obj
end

#ocnObject

Returns the value of attribute ocn.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def ocn
  @ocn
end

#ocn_Object

Returns the value of attribute ocn_.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def ocn_
  @ocn_
end

#odvObject

Returns the value of attribute odv.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def odv
  @odv
end

#ofObject

Returns the value of attribute of.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def of
  @of
end

#ospObject

Returns the value of attribute osp.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def osp
  @osp
end

#parentObject

Returns the value of attribute parent.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def parent
  @parent
end

#sizeObject

Returns the value of attribute size.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def size
  @size
end

#tagsObject

Returns the value of attribute tags.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def tags
  @tags
end

#tmpObject

Returns the value of attribute tmp.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def tmp
  @tmp
end

#widthsObject

Returns the value of attribute widths.



385
386
387
# File 'lib/sisu/ao_doc_objects.rb', line 385

def widths
  @widths
end

Instance Method Details

#table(h, o = nil) ⇒ Object



391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/sisu/ao_doc_objects.rb', line 391

def table(h,o=nil)
  of      = @of                                                                 #Symbol, classification - group
  is      = :table                                                              #Symbol, classification - specific type
  tags    = h[:tags]        || ((defined? o.tags)      ? o.tags        : [])    #Array, associated object tags, names if any
  cols    = h[:cols]        || ((defined? o.cols)      ? o.cols        : nil)
  widths  = h[:widths]      || ((defined? o.widths)    ? o.widths      : nil)
  obj     = h[:obj]         || ((defined? o.obj)       ? o.obj         : nil)   #String, text content
  idx     = h[:idx]         || ((defined? o.idx)       ? o.idx         : nil)   #String, book index provided?
  ocn     = h[:ocn]         || ((defined? o.ocn)       ? o.ocn         : nil)   #Integer, sequential on substantive-content objects
  odv     = h[:odv]         || ((defined? o.odv)       ? o.odv         : nil)
  osp     = h[:osp]         || ((defined? o.osp)       ? o.osp         : nil)
  parent  = h[:parent]      || ((defined? o.parent)    ? o.parent      : nil)   #[Node parent]
  head_   = h[:head_]       || ((defined? o.head_)     ? o.head_       : false)
  note_   = h[:note_]       || ((defined? o.note_)     ? o.note_       : false) #Bool, endnotes/footnotes? (processing optimization)
  ocn_    = if h[:ocn_].nil?
                               ((defined? o.ocn_)      ? o.ocn_        : true)  #Bool? no ocn, non-substantive content, do not include in toc #consider
  else                         h[:ocn_]
  end
  num     = h[:num]         || ((defined? o.num)       ? o.num         : nil)
  digest  = h[:digest]      || ((defined? o.digest)    ? o.digest      : nil)   #hash digests, sha512, sha256 or md5
  tmp     = h[:tmp]         || ((defined? o.tmp)       ? o.tmp         : nil)   #available for processing, empty after use
  @of,@is,@tags,@cols,@widths,@obj,@idx,@ocn,@odv,@osp,@parent,@head_,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, cols, widths, obj, idx, ocn, odv, osp, parent, head_, note_, ocn_, num, digest, tmp
  self
end