tafel 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG.txt +5 -0
  2. data/README.md +2 -0
  3. data/lib/tafel.rb +2 -2
  4. metadata +2 -2
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = tafel CHANGELOG.txt
3
3
 
4
4
 
5
+ == tafel 1.0.0 not yet released
6
+
7
+ - index tables out of .to_vtable
8
+
9
+
5
10
  == tafel 0.3.0 released 2016-05-02
6
11
 
7
12
  - settle on .flatten, .to_vtable and to_htable
data/README.md CHANGED
@@ -8,6 +8,8 @@ A Ruby library to turn pieces of data into arrays of arrays (tables).
8
8
 
9
9
  ## interface
10
10
 
11
+ Tafel provides 3 main methods.
12
+
11
13
  ### Tafel .to_htable .to_h
12
14
 
13
15
  Turns the argument into a table where keys are arrayed horizontally.
data/lib/tafel.rb CHANGED
@@ -25,7 +25,7 @@
25
25
 
26
26
  module Tafel
27
27
 
28
- VERSION = '0.3.0'
28
+ VERSION = '1.0.0'
29
29
 
30
30
  def self.table?(o)
31
31
 
@@ -41,7 +41,7 @@ module Tafel
41
41
 
42
42
  case x
43
43
  when Hash then x.to_a.collect { |k, v| [ k, to_vtable(v, limit - 1) ] }
44
- when Array then x.collect { |e| [ to_vtable(e) ] }
44
+ when Array then x.inject([]) { |a, e| a << [ a.size, to_vtable(e) ]; a }
45
45
  else x
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tafel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
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: 2016-05-01 00:00:00.000000000 Z
12
+ date: 2016-05-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec