Class: SiSU_AO_DocumentStructure::ObjectMeta
- Inherits:
-
Object
- Object
- SiSU_AO_DocumentStructure::ObjectMeta
- Defined in:
- lib/sisu/ao_doc_objects.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#is ⇒ Object
Returns the value of attribute is.
-
#obj ⇒ Object
Returns the value of attribute obj.
-
#of ⇒ Object
Returns the value of attribute of.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#tmp ⇒ Object
Returns the value of attribute tmp.
Instance Method Summary collapse
-
#initialize ⇒ ObjectMeta
constructor
A new instance of ObjectMeta.
- #metadata(h, o = nil) ⇒ Object
Constructor Details
#initialize ⇒ ObjectMeta
Returns a new instance of ObjectMeta.
79 80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 79 def initialize @is=@obj=@tag=@digest=@digest=@tmp=nil @of=:meta end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def digest @digest end |
#is ⇒ Object
Returns the value of attribute is.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def is @is end |
#obj ⇒ Object
Returns the value of attribute obj.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def obj @obj end |
#of ⇒ Object
Returns the value of attribute of.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def of @of end |
#tag ⇒ Object
Returns the value of attribute tag.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def tag @tag end |
#tmp ⇒ Object
Returns the value of attribute tmp.
78 79 80 |
# File 'lib/sisu/ao_doc_objects.rb', line 78 def tmp @tmp end |
Instance Method Details
#metadata(h, o = nil) ⇒ Object
83 84 85 86 87 88 89 90 91 92 |
# File 'lib/sisu/ao_doc_objects.rb', line 83 def (h,o=nil) 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 digest = h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, sha512, sha256 or md5 @of,@is,@tag,@obj,@digest,@tmp=of,is,tag,obj,digest,tmp self end |