Class: SiSU_AO_DocumentStructure::ObjectImage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectImage

Returns a new instance of ObjectImage.



421
422
423
424
425
# File 'lib/sisu/ao_doc_objects.rb', line 421

def initialize
  @of=:image
  @is=@obj=@lv=@idx=@size=@ocn=@parent=@note_=@ocn_=@tmp=@digest=nil
  @tags=[]
end

Instance Attribute Details

#digestObject

Returns the value of attribute digest.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def digest
  @digest
end

#idxObject

Returns the value of attribute idx.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def idx
  @idx
end

#isObject

Returns the value of attribute is.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def is
  @is
end

#lvObject

Returns the value of attribute lv.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def lv
  @lv
end

#note_Object

Returns the value of attribute note_.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def note_
  @note_
end

#objObject

Returns the value of attribute obj.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def obj
  @obj
end

#ocnObject

Returns the value of attribute ocn.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def ocn
  @ocn
end

#ocn_Object

Returns the value of attribute ocn_.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def ocn_
  @ocn_
end

#ofObject

Returns the value of attribute of.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def of
  @of
end

#parentObject

Returns the value of attribute parent.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def parent
  @parent
end

#sizeObject

Returns the value of attribute size.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def size
  @size
end

#tmpObject

Returns the value of attribute tmp.



420
421
422
# File 'lib/sisu/ao_doc_objects.rb', line 420

def tmp
  @tmp
end

Instance Method Details

#image(h, o = nil) ⇒ Object

not yet used, and what of a paragraph containing several images, consider



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# File 'lib/sisu/ao_doc_objects.rb', line 426

def image(h,o=nil)                                                         #not yet used, and what of a paragraph containing several images, consider
  of=     @of                                                              #Symbol, classification - group
  is=     :image                                                           #Symbol, classification - specific type
  tags=   h[:tags]    || ((defined? o.tags)      ? o.tags    : [])         #Array, associated object tags, names if any
  obj=    h[:obj]     || ((defined? o.obj)       ? o.obj     : nil)        #String, text content
  size=   h[:size]    || ((defined? o.size)      ? o.size    : nil)
  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]
  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
  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,@obj,@size,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,size,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
  self
end