Class: SiSU_AO_DocumentStructure::ObjectPara

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectPara

Returns a new instance of ObjectPara.



185
186
187
188
189
# File 'lib/sisu/ao_doc_objects.rb', line 185

def initialize
  @of=:para
  @is=@obj=@name=@idx=@quote_=@bullet_=@indent=@hang=@size=@ocn=@odv=@osp=@parent=@note_=@image_=@ocn_=@digest=@tmp=nil
  @tags=[]
end

Instance Attribute Details

#bullet_Object

Returns the value of attribute bullet_.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def bullet_
  @bullet_
end

#digestObject

Returns the value of attribute digest.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def digest
  @digest
end

#hangObject

Returns the value of attribute hang.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def hang
  @hang
end

#idxObject

Returns the value of attribute idx.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def idx
  @idx
end

#image_Object

Returns the value of attribute image_.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def image_
  @image_
end

#indentObject

Returns the value of attribute indent.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def indent
  @indent
end

#isObject

Returns the value of attribute is.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def is
  @is
end

#nameObject

Returns the value of attribute name.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def name
  @name
end

#note_Object

Returns the value of attribute note_.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def note_
  @note_
end

#objObject

Returns the value of attribute obj.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def obj
  @obj
end

#ocnObject

Returns the value of attribute ocn.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def ocn
  @ocn
end

#ocn_Object

Returns the value of attribute ocn_.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def ocn_
  @ocn_
end

#odvObject

Returns the value of attribute odv.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def odv
  @odv
end

#ofObject

Returns the value of attribute of.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def of
  @of
end

#ospObject

Returns the value of attribute osp.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def osp
  @osp
end

#parentObject

Returns the value of attribute parent.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def parent
  @parent
end

#quote_Object

Returns the value of attribute quote_.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def quote_
  @quote_
end

#tagsObject

Returns the value of attribute tags.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def tags
  @tags
end

#tmpObject

Returns the value of attribute tmp.



184
185
186
# File 'lib/sisu/ao_doc_objects.rb', line 184

def tmp
  @tmp
end

Instance Method Details

#docinfo(h, o = nil) ⇒ Object



217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/sisu/ao_doc_objects.rb', line 217

def docinfo(h,o=nil)
  of      = @of                                                                 #String, classification - group
  is      = :docinfo                                                            #String, classification - specific type
  name    = h[:name]        || ((defined? o.name)      ? o.name        : nil)   #String, named object?
  tags    = h[:tags]        || ((defined? o.tags)      ? o.tags        : nil)   #Array, associated object tags, names if any
  obj     = h[:obj]         || ((defined? o.obj)       ? o.obj         : nil)   #String, text content
  idx     = nil                                                                 #String, book index provided?
  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]
  indent  = nil                                                                 #Integer, indent level
  hang    = nil                                                                 #Integer, indent level
  bullet_ = false                                                               #Bool, bulleted?
  note_   = false                                                               #Bool, endnotes/footnotes? (processing optimization)
  image_  = h[:image_]      || ((defined? o.image_)    ? o.image_      : false) #Bool, images? (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,@name,@tags,@obj,@indent,@hang,@bullet_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=
  of, is, name, tags, obj, indent, hang, bullet_, idx, ocn, odv, osp, parent, image_, note_, ocn_, digest, tmp
  self
end

#paragraph(h, o = nil) ⇒ Object



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/sisu/ao_doc_objects.rb', line 190

def paragraph(h,o=nil)
  of      = @of                                                                 #Symbol, classification - group
  is      = :para                                                               #Symbol, classification - specific type
  name    = h[:name]        || ((defined? o.name)      ? o.name        : nil)   #String, named object?
  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
  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]
  indent  = h[:indent].to_s || ((defined? o.indent)    ? o.indent.to_s : nil)   #Integer, indent level
  hang    = h[:hang].to_s   || ((defined? o.hang)      ? o.hang.to_s   : nil)   #Integer, hanging indent level
  bullet_ = h[:bullet_]     || ((defined? o.bullet_)   ? o.bullet_     : false) #Bool, bulleted?
  quote_  = h[:quote_]      || ((defined? o.quote_)    ? o.quote_      : false) #Bool, quote (blockquote)?
  note_   = h[:note_]       || ((defined? o.note_)     ? o.note_       : false) #Bool, endnotes/footnotes? (processing optimization)
  image_  = h[:image_]      || ((defined? o.image_)    ? o.image_      : false) #Bool, images? (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,@name,@tags,@obj,@indent,@hang,@bullet_,@quote_,@idx,@ocn,@odv,@osp,@parent,@image_,@note_,@ocn_,@digest,@tmp=
  of, is, name, tags, obj, indent, hang, bullet_, quote_, idx, ocn, odv, osp, parent, image_, note_, ocn_, digest, tmp
  self
end