graph-function 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92c608d974ce4d380041de06d237ecb637417b9f
4
- data.tar.gz: 9f8cbb58922ff8e73b632c4d241fc31ec57c3428
3
+ metadata.gz: 421167ce11bda065293d3e2d411366c005f6dac8
4
+ data.tar.gz: 611fa94c29782e68e69a9c40e643caa7ab4fb9be
5
5
  SHA512:
6
- metadata.gz: da896a4a831a22acf5104fa6778b3cbf6cdff2b410bdab15641b21fac14e198e46d439e72b243babbf9a69fcd0d21b6e24ab0728bc2bdf212a292e62b861657e
7
- data.tar.gz: 7f12e15fac2f979a7ac80f455c91f7fe12a0349ed2570f43aa0c1306595010cf767883cc7098627483ad4383acf881d442153a839d306eaa341480c8c57ab662
6
+ metadata.gz: ee22e9f5c505376d33b136582a4afd7ab3a5f0d8a2902a80e18372fcf8f82623f8a11648b8642dad3b0cdaceaa1c1ee2c5160e16394c03a1946ae5f275dd3eb1
7
+ data.tar.gz: daa1821d691bc300454e8e683f0f2667f2392938db475ac2a6b6057383e98870a8d572b58010c6267fab0da94b2780993cab1f59a610601cd8c7929375bde4a4
data/README.md CHANGED
@@ -54,6 +54,16 @@ Or install it yourself as:
54
54
 
55
55
  ## Usage
56
56
 
57
+ ### TL;DR
58
+
59
+ From the [comparing ints example](examples/comparing_ints.rb):
60
+
61
+ ```ruby
62
+ require 'graph/function'
63
+ Graph::Function.as_gif
64
+ Graph::Function::IntsComparison.of(method(:sort), method(:bubble_sort))
65
+ ```
66
+
57
67
  ### Setup
58
68
 
59
69
  To set up, you only need the following:
@@ -1,6 +1,6 @@
1
1
  require 'graph/function'
2
2
 
3
- Graph::Function.as_gif(File.expand_path('../comparing_ints.gif', __FILE__))
3
+ Graph::Function.as_gif
4
4
 
5
5
  def bubble_sort(array)
6
6
  n = array.length
@@ -25,14 +25,14 @@ module Graph
25
25
 
26
26
  singleton_class.send(:alias_method, :as_x11, :configure)
27
27
 
28
- def self.as_gif(file)
28
+ def self.as_gif(file = File.expand_path("../#{$0.slice(0..-4)}.gif", __FILE__))
29
29
  self.configure do |config|
30
30
  config.terminal = 'gif'
31
31
  config.output = file
32
32
  end
33
33
  end
34
34
 
35
- def self.as_canvas(file)
35
+ def self.as_canvas(file = File.expand_path("../#{$0.slice(0..-4)}.html", __FILE__))
36
36
  self.configure do |config|
37
37
  config.terminal = 'canvas'
38
38
  config.output = file
@@ -1,5 +1,5 @@
1
1
  module Graph
2
2
  module Function
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graph-function
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Moore-Niemi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-25 00:00:00.000000000 Z
11
+ date: 2016-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gnuplot