Class: SiSU_AO_DocumentStructure::ObjectMeta

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObjectMeta

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

#digestObject

Returns the value of attribute digest.



80
81
82
# File 'lib/sisu/ao_doc_objects.rb', line 80

def digest
  @digest
end

#isObject

Returns the value of attribute is.



80
81
82
# File 'lib/sisu/ao_doc_objects.rb', line 80

def is
  @is
end

#objObject

Returns the value of attribute obj.



80
81
82
# File 'lib/sisu/ao_doc_objects.rb', line 80

def obj
  @obj
end

#ofObject

Returns the value of attribute of.



80
81
82
# File 'lib/sisu/ao_doc_objects.rb', line 80

def of
  @of
end

#tagObject

Returns the value of attribute tag.



80
81
82
# File 'lib/sisu/ao_doc_objects.rb', line 80

def tag
  @tag
end

#tmpObject

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