ex_aequo 0.2.3 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ex_aequo/color/text.rb +8 -6
- data/lib/ex_aequo/version.rb +1 -1
- 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: c6b01e509cb74f6f5082dab85a74484caab9cc5cf7b36c93fce837f262dc947f
|
4
|
+
data.tar.gz: 6e24bdda3f88cdb57c82796b300139e33e7a0fa41db8443e7fb1644d8ceef8c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75f600153b4b90bc5851259db66741785a388bde1c25975cd73c294c19e4b7fdbcfab2061a10b88a090a83ba2bdf3829ec8a80cc62c3504acf8ea56854eb0b6a
|
7
|
+
data.tar.gz: 036fd48fcfbbc5cc18c2749f0024cb76e4a2ff597b384b47269066c723bcfe5b3e20a07699f3e67e68265be88845fc6ebd358e92b0a60ac67b886972bb939466
|
data/lib/ex_aequo/color/text.rb
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative '../color'
|
3
4
|
module ExAequo
|
4
5
|
module Color
|
6
|
+
|
5
7
|
module Text extend self
|
6
|
-
|
8
|
+
Specials = {
|
9
|
+
reset: ExAequo::Color.reset,
|
10
|
+
eol: "\n"
|
11
|
+
}
|
12
|
+
|
7
13
|
def put_col(*segments, to: $stdout)
|
8
14
|
to.puts(colorized_text(segments))
|
9
15
|
end
|
@@ -33,11 +39,7 @@ module ExAequo
|
|
33
39
|
def _colorize(color)
|
34
40
|
case ExAequo::Color::Ansi::AnsiColorEscape[color]
|
35
41
|
when nil
|
36
|
-
|
37
|
-
ExAequo::Color.reset
|
38
|
-
else
|
39
|
-
raise ArgumentError, "#{color} not yet implemented"
|
40
|
-
end
|
42
|
+
Special.fetch(color) { raise ArgumentError, "#{color} not yet implemented" }
|
41
43
|
else
|
42
44
|
ExAequo::Color::Ansi.ansi(color)
|
43
45
|
end
|
data/lib/ex_aequo/version.rb
CHANGED