aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v4/dal_doc_objects.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-08-25 01:20:49 -0400
committerRalph Amissah <ralph@amissah.com>2013-08-25 01:21:00 -0400
commit9ccfd45405e11016bb28fc6d8ff290dff8f5c83d (patch)
tree671ed5ac3394505fe356be2ed0c4ef0bc7a37808 /lib/sisu/v4/dal_doc_objects.rb
parentv5: dal, improve font face matching within grouped text (other than code blocks) (diff)
v4: merge v5, syntax additions, block text related (version bump to 4.2.*)
* syntax add * switch ocn off and on for a block of content, line containing only off: "--~#" (omit headings where possible) "---#" on: "--+#" * alternative open and close for blocks using line starting with "```", e.g. open code block: "``` code"; close code block: "```" start poem: "``` poem"; end poem: "```" * remove need for an empty line between opening & closing of a text block [ note further refinements will be required; use of tildes "~~" considered but more problematic, tics not used elsewhere]
Diffstat (limited to 'lib/sisu/v4/dal_doc_objects.rb')
-rw-r--r--lib/sisu/v4/dal_doc_objects.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/sisu/v4/dal_doc_objects.rb b/lib/sisu/v4/dal_doc_objects.rb
index 12441156..8fdd8068 100644
--- a/lib/sisu/v4/dal_doc_objects.rb
+++ b/lib/sisu/v4/dal_doc_objects.rb
@@ -423,6 +423,33 @@ module SiSU_DAL_DocumentStructure
self
end
end
+ class ObjectFlag
+ attr_accessor :obj,:is,:of,:flag,:mod,:tmp
+ def initialize
+ @of=:flag
+ @is=@obj=@flag=@mod=@tmp=nil
+ end
+ def flag(h,o=nil)
+ of= @of #String, classification - group
+ is= :flag #String, 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
+ tmp= h[:flag] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@obj,@flag,@mod,@tmp=of,is,obj,flag,mod,tmp
+ self
+ end
+ def flag_ocn(h,o=nil)
+ of= @of #String, classification - group
+ is= :flag_ocn #String, 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
+ tmp= h[:flag] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@obj,@flag,@mod,@tmp=of,is,obj,flag,mod,tmp
+ self
+ end
+ end
class ObjectLayout
attr_accessor :obj,:is,:of,:from,:tmp
def initialize