ee 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c0fa17e7c6c611222f19230e37525bada23584aa9b794b677d9ebfd2f3752cec
4
+ data.tar.gz: 9e90a9183101fd6e2f77e454ee7090874b428f4a5656484878da9e489f60480a
5
+ SHA512:
6
+ metadata.gz: e21ee7e89a94b8cfeff9ed04112933e89a6de26f489990aca43ab34187b35d0af7ae6ca69089b25897254d45cb41c5a597638b3add333e5d39456119fd45008f
7
+ data.tar.gz: 51baf6c2a65d926a71ebcf54ea13b271fdad7bf440f55d3f9df11a7e4cc328a3bbee6eca480b39d563c8df2bf79fa636feb79b3864752d632764f960318cff82
data/bin/ee ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+
4
+ require_relative "../lib/ee"
data/lib/ee/color.rb ADDED
@@ -0,0 +1,30 @@
1
+ module Ee
2
+ module Color
3
+ def ee(color = nil)
4
+ return self unless valid_color?(color)
5
+
6
+ draw_text(color)
7
+ end
8
+
9
+ private
10
+
11
+ EE_COLORS = {
12
+ black: '30',
13
+ red: '31',
14
+ green: '32',
15
+ brown: '33',
16
+ blue: '34',
17
+ magenta: '35',
18
+ cyan: '36',
19
+ gray: '37'
20
+ }
21
+
22
+ def valid_color?(color)
23
+ EE_COLORS.key? color
24
+ end
25
+
26
+ def draw_text(color)
27
+ "\e[#{EE_COLORS[color]}m#{self}\e[0m"
28
+ end
29
+ end
30
+ end
data/lib/ee/string.rb ADDED
@@ -0,0 +1,3 @@
1
+ class String
2
+ include Ee::Color
3
+ end
data/lib/ee/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Ee
2
+ VERSION = "0.0.0"
3
+ end
data/lib/ee.rb ADDED
@@ -0,0 +1,4 @@
1
+ module Ee
2
+ require_relative "ee/color.rb"
3
+ require_relative "ee/string.rb"
4
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ee
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kaíque Kandy Koga
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-03-17 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Terminal Colors
14
+ email:
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - bin/ee
20
+ - lib/ee.rb
21
+ - lib/ee/color.rb
22
+ - lib/ee/string.rb
23
+ - lib/ee/version.rb
24
+ homepage: https://github.com/kaiquekandykoga/ee
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubygems_version: 3.3.7
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: ee
47
+ test_files: []