Sha256: 2382f36959b12f8401c105fc577d52f54932d29d77cf269fc60d6b2f9b2f457c
Contents?: true
Size: 598 Bytes
Versions: 2
Compression:
Stored size: 598 Bytes
Contents
class V < ActiveOrient::Model ## link to the library-class # create # seems not to be nessesary as its identically to the universal create # to do # def delete # delete an edge (as class method) # and # def remove # delete an edge (as instance method) def edges kind=:all # :all, :in, :out expression = case kind when :all /^in|^out/ when :in /^in/ when :out /^out/ end edges = attributes.keys.find_all{ |x| x =~ expression } edges.map{|x| attributes[x]}.flatten end def remove db.delete_vertex self end end
Version data entries
2 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active-orient-0.5 | examples/time_graph/model/vertex.rb |
active-orient-0.5 | lib/model/vertex.rb |