rbgraph 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbgraph/edge.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 377466b1a59898ba61586aad3e335d24ef0c7d57
|
4
|
+
data.tar.gz: b5db41a9102cb320a1fc07892c493d966c9c15a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b19c61848ed247290c2bdc516b9fc8c4e6054cb8f0611df2a08647701a94eef4f538a19f9fd18144b0c651046648bc2949c4bdefa37ca5b927ebb53a2b4a4a04
|
7
|
+
data.tar.gz: 626ae151a0e9b61ca6b6b4dbccb121120bda76b5a1d34998148eac9647129b296084bae2d1d2c25a37947618205bcfd6262ffe551a8cfca2f9318aeb4706a4bc
|
data/lib/rbgraph/edge.rb
CHANGED
@@ -65,8 +65,14 @@ module Rbgraph
|
|
65
65
|
attributes.merge({directed: directed, weight: weight})
|
66
66
|
end
|
67
67
|
|
68
|
+
def to_s
|
69
|
+
"[#{node1.id} #{directed ?
|
70
|
+
"=(#{attributes[:kind]}(#{weight}))=>>" :
|
71
|
+
"==(#{attributes[:kind]}(#{weight}))=="} #{node2.id}]"
|
72
|
+
end
|
73
|
+
|
68
74
|
def inspect
|
69
|
-
"<Rbgraph::Edge:##{id}
|
75
|
+
"<Rbgraph::Edge:##{id} #{to_s} #{attributes.inspect}>"
|
70
76
|
end
|
71
77
|
|
72
78
|
end
|