text-ui 0.2.3 → 0.2.4
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/lib/tui/format.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c93ee321c5505fc92c51f866aa5c31c799be70385e44a0c77c2762453aa43580
|
|
4
|
+
data.tar.gz: d07fe013128dc1896ce3ea3392d1672c5161b7cea9f5e52692e24918f91da779
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 442daa6554d8d4e3cb6097997d53f64b3e1134195f90786465f1849f9962df93304128f252f2cb7832fc49ecd615bed4bde7c0cd740be0a22f08ad415724652d
|
|
7
|
+
data.tar.gz: 18400f508ce127cee81a0504a521ed689e602b004d69886dab3c8a3bec0783b13186b960c44ef854f92318b296ed084adcf2118e9cd4eb94e9ba8ae243b99538
|
data/lib/tui/format.rb
CHANGED
|
@@ -132,7 +132,7 @@ module Tui
|
|
|
132
132
|
end
|
|
133
133
|
end
|
|
134
134
|
unless width.nil?
|
|
135
|
-
collect! { |line| crop_line line, width }
|
|
135
|
+
collect! { |line| crop_line line, width, fill }
|
|
136
136
|
end
|
|
137
137
|
self
|
|
138
138
|
end
|
|
@@ -140,7 +140,7 @@ module Tui
|
|
|
140
140
|
private
|
|
141
141
|
|
|
142
142
|
# Crop line to fit the width
|
|
143
|
-
def crop_line line, width
|
|
143
|
+
def crop_line line, width, fill
|
|
144
144
|
line_width = Tools.calc_width(line)
|
|
145
145
|
if line_width > width
|
|
146
146
|
cut_line = "#{line[...(width - 1)]}"
|