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.
81 82 83 84 |
# File 'lib/sisu/ao_doc_objects.rb', line 81 def initialize @is=@obj=@tag=@digest=@digest=@tmp=nil @of=:meta end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def digest @digest end |
#is ⇒ Object
Returns the value of attribute is.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def is @is end |
#obj ⇒ Object
Returns the value of attribute obj.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def obj @obj end |
#of ⇒ Object
Returns the value of attribute of.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def of @of end |
#tag ⇒ Object
Returns the value of attribute tag.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def tag @tag end |
#tmp ⇒ Object
Returns the value of attribute tmp.
80 81 82 |
# File 'lib/sisu/ao_doc_objects.rb', line 80 def tmp @tmp end |
Instance Method Details
#metadata(h, o = nil) ⇒ Object
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/sisu/ao_doc_objects.rb', line 85 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 |