rbgraph 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbgraph/edge.rb +7 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0c267f9931130e8382595cdab738beee199b049
4
- data.tar.gz: 841e41cd4ac0a71daa5ed6600776e00504bf4941
3
+ metadata.gz: 377466b1a59898ba61586aad3e335d24ef0c7d57
4
+ data.tar.gz: b5db41a9102cb320a1fc07892c493d966c9c15a1
5
5
  SHA512:
6
- metadata.gz: 9eb091cd1521b53c428e324fb29218cc7f5fb99420576e001fb08260566a189c149b3b39200febf030c5c923b68840948c99471ff7578552cbedfb9a0afde329
7
- data.tar.gz: 7725b8902851b2c13606b8fe3b21398ef277bf32cf03190284e1792d9602e4211d0a5c5aa7075ef4e53dcbcc4d23524b429286e0b0ae1c7155c3181ac1c692e4
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} (#{weight}) [#{node1.inspect} #{directed ? "=(#{attributes[:kind]})=>>" : "==(#{attributes[:kind]})=="} #{node2.inspect}] #{attributes.inspect}>"
75
+ "<Rbgraph::Edge:##{id} #{to_s} #{attributes.inspect}>"
70
76
  end
71
77
 
72
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbgraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Lamprianidis