class Swagify
#Swagify
Swagify
is a tiny tool to add swag to your Ruby scripts: symbol and colors, right out of the box.
Let's go!
Public Class Methods
alert()
click to toggle source
`Swagify::alert` returns ⚠
# File lib/swagify.rb, line 28 def self.alert return "\u26A0" end
cross()
click to toggle source
##Symbols
`Swagify::cross` returns ✘
# File lib/swagify.rb, line 13 def self.cross return "\u2718" end
fail()
click to toggle source
`Swagify::fail` returns a red ✘
# File lib/swagify.rb, line 47 def self.fail return self.cross.red end
gandalf_test_failed()
click to toggle source
`Swagify::gandalf_test_failed` returns an angry red Gandalf when your tests fail courtesy of Mr. [Tancredi](github.com/tancredi)
# 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()
click to toggle source
`Swagify::love` returns ♥
# File lib/swagify.rb, line 18 def self.love return "\u2665" end
success()
click to toggle source
`Swagify::success` returns a green ✔
# File lib/swagify.rb, line 42 def self.success return self.tick.green end
tick()
click to toggle source
`Swagify::tick` returns ✔
# File lib/swagify.rb, line 23 def self.tick return "\u2714" end
warning()
click to toggle source
`Swagify::warning` returns a yellow ⚠
# File lib/swagify.rb, line 52 def self.warning return self.alert.yellow end