storazzo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/storazzo/colors.rb +34 -13
  3. data/lib/storazzo.rb +18 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2104959f979d81e93afba43a3487ef3fa2750bb2122fc3e0d9eebf62b02cd483
4
- data.tar.gz: 38b969cecbdcc6238f26684c52cc06217e4c1603f9b9cd2bfa6e1fcf1d2ad17a
3
+ metadata.gz: 63792a40e1f0416183c8522847f67b89514b5f5a64c9d7532fd1887de690ea68
4
+ data.tar.gz: c859febfb0a88b7cbe160828c350e31e715ebac5af6901715b5d94fcd247ead6
5
5
  SHA512:
6
- metadata.gz: 065243d722ee11269fa97dd12b41041233fe4d0bb8bd25e8d570c65d560213c7ac02dbe7c6695a55e208db046048e17600e48e3dfba8730426aa9db2bb090454
7
- data.tar.gz: c0a6e3096a6d4b98d2bfdab33d3c97e30032b5f0d2d23a757d725a7eb9ed7719b3186321fd917a365dc6efbf45383255cbf3482b4e5440e9ab832c2af245227c
6
+ metadata.gz: 9fc27b51ba17693dbbbc030383f3c5ae5c17655c3e9bd78a53d997cfd33964f59769e5ea1873e8040a18059f4b01089ea99b5e2e84284bb5cf403f873197edfe
7
+ data.tar.gz: 69d1ebeef668df51940f913b7ef0f8c47bf4ef584a0856cf9c9d0b78ad9fc17b9f6d679305d2fba24c1d555c0a4e827ddc3561cae2e2ae9b204b40d61eb7078b
@@ -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
- # def deb(s); puts "#DEB #{s}" if $DEBUG; end
6
- # # colors 16
7
- # def gray(s) "\033[1;30m#{s}\033[0m" ; end
8
- # def green(s) "\033[1;32m#{s}\033[0m" ; end
9
- # def red(s) "\033[1;31m#{s}\033[0m" ; end
10
- # def yellow(s) "\033[1;33m#{s}\033[0m" ; end
11
- # def blue(s) "\033[1;34m#{s}\033[0m" ; end
12
- # def purple(s) "\033[1;35m#{s}\033[0m" ; end
13
- # def azure(s) "\033[1;36m#{s}\033[0m" ; end
14
- # def white(s) "\033[1;37m#{s}\033[0m" ; end
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
- # # colors 64k
17
- # def orange(s) "\033[38;5;208m#{s}\033[0m" ; end
18
+ # colors 64k
19
+ def orange(s) "\033[38;5;208m#{s}\033[0m" ; end
18
20
 
19
- # end
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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storazzo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Riccardo Carlesso