storazzo 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/storazzo/colors.rb +34 -13
- data/lib/storazzo.rb +18 -0
- 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: 63792a40e1f0416183c8522847f67b89514b5f5a64c9d7532fd1887de690ea68
|
4
|
+
data.tar.gz: c859febfb0a88b7cbe160828c350e31e715ebac5af6901715b5d94fcd247ead6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fc27b51ba17693dbbbc030383f3c5ae5c17655c3e9bd78a53d997cfd33964f59769e5ea1873e8040a18059f4b01089ea99b5e2e84284bb5cf403f873197edfe
|
7
|
+
data.tar.gz: 69d1ebeef668df51940f913b7ef0f8c47bf4ef584a0856cf9c9d0b78ad9fc17b9f6d679305d2fba24c1d555c0a4e827ddc3561cae2e2ae9b204b40d61eb7078b
|
data/lib/storazzo/colors.rb
CHANGED
@@ -1,19 +1,40 @@
|
|
1
1
|
# TODO
|
2
2
|
|
3
|
+
module Storazzo::Colors
|
3
4
|
# class Storazzo::Colors
|
5
|
+
PREPEND_ME = "[Storazzo::Colors] "
|
4
6
|
|
5
|
-
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
def deb(s); puts "#DEB #{s}" if $DEBUG; end
|
8
|
+
# colors 16
|
9
|
+
def yellow(s) "\033[1;33m#{s}\033[0m" ; end
|
10
|
+
def gray(s) "\033[1;30m#{s}\033[0m" ; end
|
11
|
+
def green(s) "\033[1;32m#{s}\033[0m" ; end
|
12
|
+
def red(s) "\033[1;31m#{s}\033[0m" ; end
|
13
|
+
def blue(s) "\033[1;34m#{s}\033[0m" ; end
|
14
|
+
def purple(s) "\033[1;35m#{s}\033[0m" ; end
|
15
|
+
def azure(s) "\033[1;36m#{s}\033[0m" ; end
|
16
|
+
def white(s) "\033[1;37m#{s}\033[0m" ; end
|
15
17
|
|
16
|
-
#
|
17
|
-
|
18
|
+
# colors 64k
|
19
|
+
def orange(s) "\033[38;5;208m#{s}\033[0m" ; end
|
18
20
|
|
19
|
-
#
|
21
|
+
# i dont undertstand why i need self :/
|
22
|
+
# SELF version because I'm just stupid or lazy or both.
|
23
|
+
def self.yellow(s) "#{PREPEND_ME}\033[1;33m#{s}\033[0m" ; end
|
24
|
+
def self.green(s) "#{PREPEND_ME}\033[1;32m#{s}\033[0m" ; end
|
25
|
+
def self.gray(s) "#{PREPEND_ME}\033[1;30m#{s}\033[0m" ; end
|
26
|
+
def self.green(s) "#{PREPEND_ME}\033[1;32m#{s}\033[0m" ; end
|
27
|
+
def self.red(s) "#{PREPEND_ME}\033[1;31m#{s}\033[0m" ; end
|
28
|
+
def self.blue(s) "#{PREPEND_ME}\033[1;34m#{s}\033[0m" ; end
|
29
|
+
def self.purple(s) "#{PREPEND_ME}\033[1;35m#{s}\033[0m" ; end
|
30
|
+
def self.azure(s) "#{PREPEND_ME}\033[1;36m#{s}\033[0m" ; end
|
31
|
+
def self.white(s) "#{PREPEND_ME}\033[1;37m#{s}\033[0m" ; end
|
32
|
+
|
33
|
+
# p<COLOR> Carlessian functions..
|
34
|
+
def pwhite(s) puts(white(s)); end
|
35
|
+
def pgreen(s) puts(green(s)); end
|
36
|
+
def pred(s) puts(red(s)); end
|
37
|
+
def pyellow(s) puts(yellow(s)); end
|
38
|
+
|
39
|
+
|
40
|
+
end
|
data/lib/storazzo.rb
CHANGED
@@ -12,10 +12,28 @@ module StorazzoMod
|
|
12
12
|
end
|
13
13
|
|
14
14
|
class Storazzo
|
15
|
+
require 'storazzo/colors'
|
16
|
+
|
15
17
|
# version 1.2
|
16
18
|
def self.hi
|
17
19
|
puts "Hello from Storazzo v#{StorazzoMod::VERSION rescue :ERROR}!"
|
18
20
|
end
|
21
|
+
|
22
|
+
def self.all_tests
|
23
|
+
# include vs extend: https://stackoverflow.com/questions/15097929/ruby-module-require-and-include
|
24
|
+
#include Storazzo::Colors
|
25
|
+
extend Storazzo::Colors
|
26
|
+
|
27
|
+
pwhite "All tests BEGIN"
|
28
|
+
#puts "This is Storazzo v#{StorazzoMod::VERSION}"
|
29
|
+
hi
|
30
|
+
puts(yellow "Just YELLOW 0")
|
31
|
+
#puts(Storazzo::Colors.yellow "Test YELLOW 1 self")
|
32
|
+
puts(Colors.yellow "Test YELLOW 1 self")
|
33
|
+
puts(Colors.green "Test YELLOW 2 ohne self")
|
34
|
+
pwhite "All tests END"
|
35
|
+
#puts "All tests END"
|
36
|
+
end
|
19
37
|
end
|
20
38
|
|
21
39
|
require 'storazzo/translator'
|