rviz 0.0.6 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rviz/graph.rb CHANGED
@@ -50,7 +50,7 @@ module Rviz
50
50
  end
51
51
 
52
52
  def add_subgraph
53
- # TODO
53
+ # todo
54
54
  end
55
55
 
56
56
  def add_record name, attr = {}
@@ -74,7 +74,7 @@ module Rviz
74
74
  self
75
75
  end
76
76
 
77
- ## output dot language source to file or to STDOUT
77
+ ## output dot language source to file or to stdout
78
78
  def output file=STDOUT
79
79
  fh = file
80
80
  fh = File.open(file, "w:utf-8") if file.is_a?(String)
@@ -95,10 +95,9 @@ module Rviz
95
95
  @links.each do |ary|
96
96
  raise "#{ary[0]} not found as a node" unless @nodes[ary[0]] # from
97
97
  raise "#{ary[2]} not found as a node" unless @nodes[ary[2]] # to
98
- if %w[Mrecord record].include?(@nodes[ary[0]].shape)
99
- ary[1] = @nodes[ary[0]].get_anchor(ary[1])
100
- ary[3] = @nodes[ary[2]].get_anchor(ary[3])
101
- end
98
+ ary[1] = @nodes[ary[0]].get_anchor(ary[1]) if @nodes[ary[0]].is_a?(Record)
99
+ ary[3] = @nodes[ary[2]].get_anchor(ary[3]) if @nodes[ary[2]].is_a?(Record)
100
+
102
101
  @edges << Edge.new(*ary)
103
102
  end
104
103
 
@@ -109,7 +108,7 @@ module Rviz
109
108
  end
110
109
  end
111
110
 
112
- class SubGraph < Graph
111
+ class Subgraph < Graph
113
112
  attr_accessor :name
114
113
  def graph_start; " subgraph #{self.name} {" end
115
114
  def graph_end; " }" end
data/lib/rviz/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Rviz
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.9'
3
3
  end
4
4
 
data/lib/rviz.rb CHANGED
@@ -17,7 +17,7 @@ module Rviz
17
17
  end
18
18
 
19
19
  def quote str
20
- if str.match(/\W/)
20
+ if str.to_s.match(/\W/)
21
21
  %Q{"#{str.to_s}"}
22
22
  else
23
23
  str.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-09 00:00:00.000000000 Z
12
+ date: 2013-03-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec