in_columns 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/README.md +7 -3
- data/Rakefile +2 -0
- data/in_columns.gemspec +1 -1
- data/lib/in_columns/version.rb +1 -1
- data/test/in_columns/columnizer_test.rb +0 -6
- data/test/test_helper.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWE2ZjQ5NjNmMTBlYjU1NzVkYzAxZjE2MGY2NTY4NGVlOGY3MWUzNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGI3Nzg2ZjQxNzA2ZGVkZjczYjRhY2ZmNzhkZWUxNGQ5N2IwZTkyNQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzQ1MTg0Yzk0OWUzNDcxNGMzODAyMjBmYzNmODRlMTg4MzJkODJlODE4NDJk
|
10
|
+
MzNmNTJlZGUwY2Q3Y2E4NjNkY2I3YmU5YzMzOGEwNWMxMmZmN2U3NzczM2Q1
|
11
|
+
YTNkOTgzN2QwMjViNmZiMDNhZmIxM2MyZjNiNjhmN2JkODQ1MzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWU1ZDgxZDAzMjZhMTFjN2MzZTQxYzc0NDVmNDI3OTk3MGFkZmU5YzU4MmUw
|
14
|
+
MDY0OGY0NWNkNGUyOTI0NjRjNmIwZjViODhmOTcxNDg5OWUxMDE3ZGY3YmM0
|
15
|
+
NWIxMDUxMjg0ODkyNDc2NjVjZDg2ZWExN2U0NTdiNDhiOTUyZDI=
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
InColumns distributes the elements of an array into a number of equal-height columns.
|
4
4
|
|
5
|
+
This is useful when you want to format a straight array into a number of
|
6
|
+
columns - say for displaying it to an end user.
|
7
|
+
|
8
|
+
[![Build Status](https://travis-ci.org/koppen/in_columns.png?branch=master)](https://travis-ci.org/koppen/in_columns) [![Coverage Status](https://coveralls.io/repos/koppen/in_columns/badge.png)](https://coveralls.io/r/koppen/in_columns) [![Code Climate](https://codeclimate.com/github/koppen/in_columns.png)](https://codeclimate.com/github/koppen/in_columns)
|
9
|
+
|
10
|
+
## Usage example
|
11
|
+
|
5
12
|
list = ['a', 'b', 'c', 'd', 'e']
|
6
13
|
InColumns.columnize(list, 2)
|
7
14
|
#=> [['a', 'c', 'e'], ['b', 'd']]
|
@@ -9,9 +16,6 @@ InColumns distributes the elements of an array into a number of equal-height col
|
|
9
16
|
InColumns.columnize(list, 3)
|
10
17
|
#=> [['a', 'd'], ['b', 'e'], ['c']]
|
11
18
|
|
12
|
-
This is useful when you want to format a straight array into a number of
|
13
|
-
columns - say for displaying it to an end user.
|
14
|
-
|
15
19
|
## Extension to Array
|
16
20
|
|
17
21
|
If you feel so inclined, InColumns comes with a module that can be included
|
data/Rakefile
CHANGED
data/in_columns.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["jakob@mentalized.net"]
|
11
11
|
spec.description = %q{InColumns distributes the elements of an array into a number of equal-height columns.}
|
12
12
|
spec.summary = %q{Distributes array elements into columns.}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/koppen/in_columns"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
data/lib/in_columns/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: in_columns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jakob Skjerning
|
@@ -47,6 +47,7 @@ extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
49
|
- .gitignore
|
50
|
+
- .travis.yml
|
50
51
|
- Gemfile
|
51
52
|
- LICENSE.txt
|
52
53
|
- README.md
|
@@ -60,7 +61,7 @@ files:
|
|
60
61
|
- test/in_columns/columnizer_test.rb
|
61
62
|
- test/in_columns_test.rb
|
62
63
|
- test/test_helper.rb
|
63
|
-
homepage:
|
64
|
+
homepage: https://github.com/koppen/in_columns
|
64
65
|
licenses:
|
65
66
|
- MIT
|
66
67
|
metadata: {}
|