projects
/
graph.njae.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial commit
[graph.njae.git]
/
lib
/
graph
/
graph.rb~
1
require 'ostruct'
2
3
module Graph
4
class Graph < OpenStruct
5
def initialize
6
super
7
self.edges = Array.new
8
self.vertices = Array.new
9
end
10
11
def <<(other)
12
if other.class == Vertex
13
self.vertices << other
14
elsif
15
self.edges << other
16
end
17
self
18
end
19
end
20
end