Class: SiSU_AO_DocumentStructure::ObjectBlockTxt

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectBlockTxt

Returns a new instance of ObjectBlockTxt.



246
247
248
249
250
# File 'lib/sisu/ao_doc_objects.rb', line 246

def initialize
  @of=:block
  @is=@obj=@lngsyn=@idx=@ocn=@odv=@osp=@parent=@note_=@number_=@ocn_=@digest=@tmp=nil
  @tags=[]
end

Instance Attribute Details

#digestObject

Returns the value of attribute digest.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def digest
  @digest
end

#idxObject

Returns the value of attribute idx.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def idx
  @idx
end

#isObject

Returns the value of attribute is.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def is
  @is
end

#lngsynObject

Returns the value of attribute lngsyn.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def lngsyn
  @lngsyn
end

#note_Object

Returns the value of attribute note_.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def note_
  @note_
end

#number_Object

Returns the value of attribute number_.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def number_
  @number_
end

#objObject

Returns the value of attribute obj.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def obj
  @obj
end

#ocnObject

Returns the value of attribute ocn.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def ocn
  @ocn
end

#ocn_Object

Returns the value of attribute ocn_.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def ocn_
  @ocn_
end

#odvObject

Returns the value of attribute odv.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def odv
  @odv
end

#ofObject

Returns the value of attribute of.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def of
  @of
end

#ospObject

Returns the value of attribute osp.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def osp
  @osp
end

#parentObject

Returns the value of attribute parent.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def parent
  @parent
end

#tagsObject

Returns the value of attribute tags.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def tags
  @tags
end

#tmpObject

Returns the value of attribute tmp.



245
246
247
# File 'lib/sisu/ao_doc_objects.rb', line 245

def tmp
  @tmp
end

Instance Method Details

#alt(h, o = nil) ⇒ Object

see block



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
# File 'lib/sisu/ao_doc_objects.rb', line 341

def alt(h,o=nil)                                                                #see block
  of       = @of                                                                #Symbol, classification - group
  is       = :alt                                                               #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
  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
  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,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
  self
end

#block(h, o = nil) ⇒ Object



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
# File 'lib/sisu/ao_doc_objects.rb', line 297

def block(h,o=nil)
  of       = @of                                                                #Symbol, classification - group
  is       = :block                                                             #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
  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
  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,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
  self
end

#box(h, o = nil) ⇒ Object



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
# File 'lib/sisu/ao_doc_objects.rb', line 275

def box(h,o=nil)
  of       = @of                                                                #Symbol, classification - group
  is       = :box                                                               #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
  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
  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,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
  self
end

#code(h, o = nil) ⇒ Object



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# File 'lib/sisu/ao_doc_objects.rb', line 251

def code(h,o=nil)
  of       = @of                                                                #Symbol, classification - group #alt 'code'
  is       = :code                                                              #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
  lngsyn   = h[:lngsyn]     || ((defined? o.lngsyn)    ? o.lngsyn      : :txt)  #symbol, code lngsyn
  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]
  number_  = h[:number_]    || ((defined? o.number_)   ? o.number_     : false) #Bool, numbered or not?
  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,@obj,@lngsyn,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, lngsyn, idx, ocn, odv, osp, parent, number_, note_, ocn_, num, digest, tmp
  self
end

#group(h, o = nil) ⇒ Object



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
# File 'lib/sisu/ao_doc_objects.rb', line 319

def group(h,o=nil)
  of       = @of                                                                #Symbol, classification - group
  is       = :group                                                             #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
  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
  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,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
  self
end

#verse(h, o = nil) ⇒ Object

part of poem decide how you deal with this



363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/sisu/ao_doc_objects.rb', line 363

def verse(h,o=nil)                                                              #part of poem decide how you deal with this
  of       = @of                                                                #Symbol, classification - group
  is       = :verse                                                             #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
  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]
  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,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@num,@digest,@tmp=
  of, is, tags, obj, idx, ocn, odv, osp, parent, note_, ocn_, num, digest, tmp
  @h=nil
  self
end