Class: Swagify
- Inherits:
-
Object
- Object
- Swagify
- Defined in:
- lib/swagify.rb
Overview
#Swagify
Swagify is a tiny tool to add swag to your Ruby scripts: symbol and colors, right out of the box.
Let’s go!
Class Method Summary collapse
-
.alert ⇒ Object
‘Swagify::alert` returns ⚠.
-
.cross ⇒ Object
##Symbols.
-
.fail ⇒ Object
‘Swagify::fail` returns a red ✘.
-
.gandalf_test_failed ⇒ Object
‘Swagify::gandalf_test_failed` returns an angry red Gandalf when your tests fail courtesy of Mr.
-
.love ⇒ Object
‘Swagify::love` returns ♥.
-
.success ⇒ Object
‘Swagify::success` returns a green ✔.
-
.tick ⇒ Object
‘Swagify::tick` returns ✔.
-
.warning ⇒ Object
‘Swagify::warning` returns a yellow ⚠.
Class Method Details
.alert ⇒ Object
‘Swagify::alert` returns ⚠
28 29 30 |
# File 'lib/swagify.rb', line 28 def self.alert return "\u26A0" end |
.cross ⇒ Object
##Symbols
‘Swagify::cross` returns ✘
13 14 15 |
# File 'lib/swagify.rb', line 13 def self.cross return "\u2718" end |
.fail ⇒ Object
‘Swagify::fail` returns a red ✘
47 48 49 |
# File 'lib/swagify.rb', line 47 def self.fail return self.cross.red end |
.gandalf_test_failed ⇒ Object
‘Swagify::gandalf_test_failed` returns an angry red Gandalf when your tests fail courtesy of Mr. [Tancredi](github.com/tancredi)
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/swagify.rb', line 62 def self.gandalf_test_failed gandalf = <<EOF _ _ | . \\ . / \\ / / \\ | | . | | | | \\ / \\ / | | | | -- / \\ -- | | | | __/_____\\__ | | |_| | o o | (==_==) (_)______\\( 0 )/______(_) | | ( ) | | | | _/-. \\ / .-\\_ ' .__|_|/___/_________\\__\\_______. | ' ' | | YOU SHALL NOT PASS!! | |______________________________| /__---____---__\\ '---' '---' EOF return gandalf.red end |
.love ⇒ Object
‘Swagify::love` returns ♥
18 19 20 |
# File 'lib/swagify.rb', line 18 def self.love return "\u2665" end |
.success ⇒ Object
‘Swagify::success` returns a green ✔
42 43 44 |
# File 'lib/swagify.rb', line 42 def self.success return self.tick.green end |
.tick ⇒ Object
‘Swagify::tick` returns ✔
23 24 25 |
# File 'lib/swagify.rb', line 23 def self.tick return "\u2714" end |
.warning ⇒ Object
‘Swagify::warning` returns a yellow ⚠
52 53 54 |
# File 'lib/swagify.rb', line 52 def self.warning return self.alert.yellow end |