ruby_figlet 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -6
- data/lib/ruby_figlet.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eb3e00a6eaf79b3fbbdf1dec8798d713faf85af
|
4
|
+
data.tar.gz: dc42d544a4adcb208b3291d49dd79a6cd1d46e87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 597fdf48feb5e8f4d6ed8c6f1a46acccb3ec24f26f29c2a882e8b91e39b05b6de8b4a37112bf8d189eee679d7f5b3071572b8e4c816f40fc46403165a0ecc5dd
|
7
|
+
data.tar.gz: 267c14396ea90d977bb4587f46d6b9f186e2a6150934e7bee7a32754079a83277e1ff4ca199bbed6fda2e2e0f9a2439e465fb87e5a4e1eb4e745c3eef2889758
|
data/README.md
CHANGED
@@ -8,6 +8,20 @@ gem install ruby_figlet
|
|
8
8
|
```
|
9
9
|
|
10
10
|
## Usage
|
11
|
+
In your shell
|
12
|
+
```shell
|
13
|
+
ruby-figlet -f alligator "ruby"
|
14
|
+
|
15
|
+
::::::::: ::: ::: ::::::::: ::: :::
|
16
|
+
:+: :+: :+: :+: :+: :+: :+: :+:
|
17
|
+
+:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+
|
18
|
+
+#++:++#: +#+ +:+ +#++:++#+ +#++:
|
19
|
+
+#+ +#+ +#+ +#+ +#+ +#+ +#+
|
20
|
+
#+# #+# #+# #+# #+# #+# #+#
|
21
|
+
### ### ######## ######### ###
|
22
|
+
|
23
|
+
```
|
24
|
+
But mainly as a library
|
11
25
|
```ruby
|
12
26
|
require 'ruby_figlet'
|
13
27
|
using RubyFiglet # For String.new(...).art / .art! Moneky Patches
|
@@ -24,12 +38,11 @@ puts moo # Default font is 'standard' when no arguments given
|
|
24
38
|
# | | | || (_) || (_) ||_|
|
25
39
|
# |_| |_| \___/ \___/ (_)
|
26
40
|
|
41
|
+
# or
|
27
42
|
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
print RubyFiglet::Figlet.new("meow...").stringify
|
32
|
-
RubyFiglet::Figlet.new("meow...").show # all work the same
|
43
|
+
puts "meow...".art # all
|
44
|
+
puts RubyFiglet::Figlet.new("meow...").stringify # work
|
45
|
+
RubyFiglet::Figlet.new("meow...").show # equally
|
33
46
|
|
34
47
|
# str.art(font)/str.art!(font) and RubyFiglet::Figlet.new(str, font) have a font parameter!
|
35
48
|
|
@@ -45,7 +58,14 @@ puts "Heizölrückstoßabdämpfung".art # =>
|
|
45
58
|
# |_| |_| \___||_|/___| \___/ |_||_| \__,_| \___||_|\_\|___/ \__| \___/ | ||_/ \__,_||_.__/ \__,_| \__,_||_| |_| |_|| .__/ |_| \__,_||_| |_| \__, |
|
46
59
|
# |_| |_| |___/
|
47
60
|
|
48
|
-
puts RubyFiglet::Figlet.new("It's an abstract sort of font", 'weird').stringify
|
61
|
+
puts RubyFiglet::Figlet.new("It's an abstract sort of font", 'weird').stringify # =>
|
62
|
+
# __ __
|
63
|
+
# / / / / / / / / / /
|
64
|
+
# ( (___ ___ ___ ___ ___ (___ ___ (___ ___ ___ ___ (___ ___ ___ ___ (___ ___ ( ( ___ ___ (___
|
65
|
+
# | | |___ | )| ) | )| )|___ | | )| )| | |___ | )| )| | )|___ |___ | )| )|
|
66
|
+
# | |__ __/ |__/|| / |__/||__/ __/ |__ | |__/||__ |__ __/ |__/ | |__ |__/ | | |__/ | / |__
|
67
|
+
|
68
|
+
|
49
69
|
|
50
70
|
bowl = "Soup?"
|
51
71
|
bowl.art! 'alphabet'
|
@@ -56,4 +76,24 @@ puts bowl # => SSS ???
|
|
56
76
|
# SSSS ooo uuu ppp ?
|
57
77
|
# p
|
58
78
|
# p
|
79
|
+
|
80
|
+
# Newline support!
|
81
|
+
two_lines = RubyFiglet::Figlet.new "broken\nline", 'basic'
|
82
|
+
two_lines.show
|
83
|
+
# =>
|
84
|
+
# d8888b. d8888b. .d88b. db dD d88888b d8b db
|
85
|
+
# 88 `8D 88 `8D .8P Y8. 88 ,8P' 88' 888o 88
|
86
|
+
# 88oooY' 88oobY' 88 88 88,8P 88ooooo 88V8o 88
|
87
|
+
# 88~~~b. 88`8b 88 88 88`8b 88~~~~~ 88 V8o88
|
88
|
+
# 88 8D 88 `88. `8b d8' 88 `88. 88. 88 V888
|
89
|
+
# Y8888P' 88 YD `Y88P' YP YD Y88888P VP V8P
|
90
|
+
# db d888888b d8b db d88888b
|
91
|
+
# 88 `88' 888o 88 88'
|
92
|
+
# 88 88 88V8o 88 88ooooo
|
93
|
+
# 88 88 88 V8o88 88~~~~~
|
94
|
+
# 88booo. .88. 88 V888 88.
|
95
|
+
# Y88888P Y888888P VP V8P Y88888P
|
96
|
+
|
97
|
+
|
98
|
+
|
59
99
|
```
|
data/lib/ruby_figlet.rb
CHANGED