colorful_tables 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/lib/colorful_tables/column.rb +2 -2
- data/lib/colorful_tables/table.rb +2 -3
- data/lib/colorful_tables/version.rb +1 -1
- metadata +4 -3
data/CHANGELOG
ADDED
@@ -7,8 +7,7 @@ module ColorfulTables
|
|
7
7
|
class Table
|
8
8
|
|
9
9
|
DEFAULT_OPTIONS = {
|
10
|
-
:border_color
|
11
|
-
:digits_after_decimal_point => 4
|
10
|
+
:border_color => :light_blue
|
12
11
|
}
|
13
12
|
|
14
13
|
attr_accessor :data, :options
|
@@ -67,7 +66,7 @@ module ColorfulTables
|
|
67
66
|
|
68
67
|
def format(row_elements, in_header = false)
|
69
68
|
output = row_elements.inject_with_index(@border_chars[:vertical]) do |s, element, index|
|
70
|
-
value = ColorfulTables.truncate_if_decimals(element, @
|
69
|
+
value = ColorfulTables.truncate_if_decimals(element, @columns_options[index][:digits_after_decimal_point])
|
71
70
|
color = if in_header
|
72
71
|
@columns_options[index][:header_color]
|
73
72
|
else
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colorful_tables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 1
|
10
|
+
version: 0.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Javier Vidal
|
@@ -42,6 +42,7 @@ extra_rdoc_files: []
|
|
42
42
|
|
43
43
|
files:
|
44
44
|
- .gitignore
|
45
|
+
- CHANGELOG
|
45
46
|
- Gemfile
|
46
47
|
- Rakefile
|
47
48
|
- colorful_tables.gemspec
|