graphkit 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/graphkit.gemspec +2 -2
- data/lib/graphkit.rb +12 -0
- data/test/test_graphkit.rb +3 -0
- 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: b1392606ad09e84551b517e9a7466597a1a2403e
|
4
|
+
data.tar.gz: d43d0eeea0e3c2061687a17b1410512c616be383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90edfa91cec525cfa891ef0d157a2c23359ff8807653b417b018cb3db9f9b659a8c475314f36ae28a1cc2f1c711e435bf46792973a0a0b4410b056de8cd459aa
|
7
|
+
data.tar.gz: db84897ce19d6a1ef92f60a126cf4f686e3a12aa37df6f14bf150a4d5b038ad87fdc761e3b74011f063d407e14bff8b87fcba72434d1d22be1375b355604f531
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/graphkit.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: graphkit 0.4.
|
5
|
+
# stub: graphkit 0.4.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "graphkit"
|
9
|
-
s.version = "0.4.
|
9
|
+
s.version = "0.4.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/graphkit.rb
CHANGED
@@ -277,6 +277,14 @@ class GraphKit < KitHash
|
|
277
277
|
|
278
278
|
|
279
279
|
class MultiKit < Array
|
280
|
+
|
281
|
+
def self.uninspect(arr, ivars)
|
282
|
+
mkit = new(arr)
|
283
|
+
ivars.each do |var,val|
|
284
|
+
mkit.instance_variable_set(var,val)
|
285
|
+
end
|
286
|
+
mkit
|
287
|
+
end
|
280
288
|
def merge(other)
|
281
289
|
size.times do |i|
|
282
290
|
self[i] += other[i] if other[i]
|
@@ -288,6 +296,10 @@ class GraphKit < KitHash
|
|
288
296
|
merge(other)
|
289
297
|
end
|
290
298
|
|
299
|
+
def inspect
|
300
|
+
"GraphKit::MultiKit.uninspect(#{super}, :@gnuplot_sets=>#{@gnuplot_sets.inspect})"
|
301
|
+
end
|
302
|
+
|
291
303
|
|
292
304
|
end
|
293
305
|
MultiWindow = MultiKit # Backwards compatibility
|
data/test/test_graphkit.rb
CHANGED
@@ -74,6 +74,9 @@ class TestGraphkit < Test::Unit::TestCase
|
|
74
74
|
|
75
75
|
multiplot2 = GraphKit::MultiKit.new([GraphKit.quick_create([[0,3], [2,4]])])
|
76
76
|
multiplot.merge(multiplot2)
|
77
|
+
|
78
|
+
p multiplot.inspect
|
79
|
+
assert_equal(GraphKit::MultiKit, eval(multiplot.inspect).class )
|
77
80
|
|
78
81
|
|
79
82
|
pp multiplot
|