projects
/
graph.njae.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 'require 'bundler/setup'
[graph.njae.git]
/
lib
/
graph.njae
/
graph.rb
diff --git
a/lib/graph.njae/graph.rb
b/lib/graph.njae/graph.rb
index 1da5297d1f74861b24ce417dc2ac6c0ff3181111..e08a1ad8544d12aec4cacf3a095ca5e1e5df6aea 100644
(file)
--- a/
lib/graph.njae/graph.rb
+++ b/
lib/graph.njae/graph.rb
@@
-16,9
+16,9
@@
module GraphNjae
# Add a Vertex or Edge to the graph.
def <<(other)
# Add a Vertex or Edge to the graph.
def <<(other)
- if other.class
==
Vertex
+ if other.class
.ancestors.include?
Vertex
self.vertices << other
self.vertices << other
- elsif
+ elsif
other.class.ancestors.include? Edge
self.edges << other
end
self
self.edges << other
end
self