aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/ao_doc_objects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/ao_doc_objects.rb')
-rw-r--r--lib/sisu/v6/ao_doc_objects.rb102
1 files changed, 51 insertions, 51 deletions
diff --git a/lib/sisu/v6/ao_doc_objects.rb b/lib/sisu/v6/ao_doc_objects.rb
index 9555ab5e..972a8392 100644
--- a/lib/sisu/v6/ao_doc_objects.rb
+++ b/lib/sisu/v6/ao_doc_objects.rb
@@ -74,8 +74,8 @@ module SiSU_AO_DocumentStructure
@of=:meta
end
def metadata(tags)
- of= @of #String, classification - group
- is= :meta #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :meta #Symbol, classification - specific type
tags= tags || ((defined? o.tags) ? o.tags : {}) #String, metadata type/tag
obj= nil
@of,@is,@tags,@obj=of,is,tags,obj
@@ -89,8 +89,8 @@ module SiSU_AO_DocumentStructure
@of=:meta
end
def metadata(h,o=nil)
- of= @of #String, classification - group
- is= :meta #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :meta #Symbol, classification - specific type
tag= h[:tag] || ((defined? o.tag) ? o.tag : nil) #String, metadata type/tag
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
@@ -142,8 +142,8 @@ module SiSU_AO_DocumentStructure
and (h[:ln] and h[:ln].to_s=~/[0-9]/)
h[:lv]=heading_lv(h[:ln])
end
- of= @of #String, classification - group
- is= :heading #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :heading #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
@@ -191,8 +191,8 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def paragraph(h,o=nil)
- of= @of #String, classification - group
- is= :para #String, classification - specific type
+ 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
@@ -247,8 +247,8 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def code(h,o=nil)
- of= @of #String, classification - group #alt 'code'
- is= :code #String, classification - specific type
+ 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
idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
@@ -268,8 +268,8 @@ module SiSU_AO_DocumentStructure
self
end
def block(h,o=nil)
- of= @of #String, classification - group
- is= :block #String, classification - specific type
+ 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?
@@ -288,8 +288,8 @@ module SiSU_AO_DocumentStructure
self
end
def group(h,o=nil)
- of= @of #String, classification - group
- is= :group #String, classification - specific type
+ 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?
@@ -308,8 +308,8 @@ module SiSU_AO_DocumentStructure
self
end
def alt(h,o=nil) #see block
- of= @of #String, classification - group
- is= :alt #String, classification - specific type
+ 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?
@@ -328,8 +328,8 @@ module SiSU_AO_DocumentStructure
self
end
def verse(h,o=nil) #part of poem decide how you deal with this
- of= @of #String, classification - group
- is= :verse #String, classification - specific type
+ 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?
@@ -349,15 +349,15 @@ module SiSU_AO_DocumentStructure
end
end
class ObjectTable
- attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:number,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp
+ attr_accessor :obj,:is,:of,:lv,:tags,:name,:idx,:indent,:hang,:size,:ocn,:num,:head_,:cols,:widths,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp
def initialize
@of=:block
- @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@number,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@num=@digest=@tmp=nil
+ @is=@obj=@lv=@name=@idx=@indent=@hang=@size=@ocn,@num,@head_,@cols,@widths=@odv=@osp=@parent=@note_=@ocn_=@num=@digest=@tmp=nil
@tags=[]
end
def table(h,o=nil)
- of= @of #String, classification - group
- is= :table #String, classification - specific type
+ 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)
@@ -370,9 +370,9 @@ module SiSU_AO_DocumentStructure
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? then ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ else h[:ocn_]
end
- num= h[:num] || ((defined? o.num) ? o.num : nil)
+ 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
@@ -387,8 +387,8 @@ module SiSU_AO_DocumentStructure
@tags=[]
end
def image(h,o=nil) #not yet used, and what of a paragraph containing several images, consider
- of= @of #String, classification - group
- is= :image #String, classification - specific type
+ 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)
@@ -414,8 +414,8 @@ module SiSU_AO_DocumentStructure
@is=@obj=@node=@lv=@ln=@lc=@status=@tmp=nil
end
def xml_dom(h,o=nil)
- of= @of #String, classification - group
- is= :xml_dom #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :xml_dom #Symbol, classification - specific type
obj= h[:obj] || ((defined? o.obj) ? o.obj : '') #String, text content
lv= h[:lv] || ((defined? o.lv) ? o.lv : nil) #Alpha-numeric, document structure as used in markup, A-D then 1-6
ln= h[:ln] || ((defined? o.ln) ? o.ln : nil) #Integer, document structure level, for convenience in processing 1-9
@@ -427,21 +427,6 @@ module SiSU_AO_DocumentStructure
self
end
end
- class ObjectComment
- attr_accessor :obj,:is,:of,:tmp
- def initialize
- @of=:comment
- @is=@obj=@tmp=nil
- end
- def comment(h,o=nil)
- of= @of #String, classification - group
- is= :comment #String, 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
- end
class ObjectFlag
attr_accessor :obj,:is,:of,:flag,:mod,:tmp
def initialize
@@ -449,8 +434,8 @@ module SiSU_AO_DocumentStructure
@is=@obj=@flag=@mod=@tmp=nil
end
def flag(h,o=nil)
- of= @of #String, classification - group
- is= :flag #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :flag #Symbol, classification - specific type
obj= nil #String, text content
flag= h[:flag] || ((defined? o.flag) ? o.flag : nil) #String, text content
mod= h[:mod] || ((defined? o.mod) ? o.mod : nil) #String, text content
@@ -459,8 +444,8 @@ module SiSU_AO_DocumentStructure
self
end
def flag_ocn(h,o=nil)
- of= @of #String, classification - group
- is= :flag_ocn #String, classification - specific type
+ of= @of #Symbol, classification - group
+ is= :flag_ocn #Symbol, classification - specific type
obj= nil #String, text content
flag= h[:flag] || ((defined? o.flag) ? o.flag : nil) #String, text content
mod= h[:mod] || ((defined? o.mod) ? o.mod : nil) #String, text content
@@ -476,8 +461,8 @@ module SiSU_AO_DocumentStructure
@is=@obj=@from=@tmp=nil
end
def break(h,f=nil) #decide how to deal with
- of= @of #String, classification - group
- is= :break #String, classification - specific type
+ 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
@@ -485,8 +470,23 @@ module SiSU_AO_DocumentStructure
self
end
def insert(h,o=nil) #decide how to deal with, could mimic paragraph?
- of= @of #String, classification - group
- is= :insert #String, classification - specific type
+ 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
+ end
+ class ObjectComment
+ attr_accessor :obj,:is,:of,:tmp
+ def initialize
+ @of=:comment
+ @is=@obj=@tmp=nil
+ end
+ def comment(h,o=nil)
+ of= @of #Symbol, classification - group
+ is= :comment #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