Class: Hash

Inherits:
Object show all
Defined in:
ext/fipdf/src/fachinfo_writer.rb

Direct Known Subclasses

ODDB::FiPDF::SubstanceIndex

Instance Method Summary collapse

Instance Method Details

#obj_path(id, obj_path_id = nil) ⇒ Object



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'ext/fipdf/src/fachinfo_writer.rb', line 89

def obj_path(id, obj_path_id=nil)
	super or begin
		each { |key, item|
			if(item.__id__ == id)
				return [key]
			elsif(key.__id__ == id)
				return ["hash-key"]
			elsif(path = item.obj_path(id, obj_path_id))
				path.unshift(key)
				return path
			end
		}
		nil
	end
end