ascii_drawing_generator 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ascii_drawing_generator.rb +168 -0
  3. metadata +87 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 711215620909f1352c5686b9271f17d69c23744f
4
+ data.tar.gz: e4db8356aaf7475ac571949031cc7c09fefa1ce4
5
+ SHA512:
6
+ metadata.gz: c53d9b7da9e3a3277268fd0fd0d4e0a8c5c73143a6f8a138540e0b1d97d785326b4721244d9c8e4393f00038094003004843f53120fac3529d2797264220b55b
7
+ data.tar.gz: b8f4dabd31c14d239685589ea9f6f67f10fe427ff7e370cfb3392f3409351f98b1a5654c2c020b73beab7ed212c8e3ff0b812abfe15755e2cb519ee39834a789
@@ -0,0 +1,168 @@
1
+ #require "ascii/drawing/generator/version"
2
+ module AsciiDrawingGenerator
3
+ class Drawing
4
+
5
+ def self.draw_cat
6
+ heads = []
7
+ bodies = []
8
+ heads.push('
9
+ ∆ ∆
10
+ / \____/ \
11
+ /∞∞∞∞∞∞∞∞∞∞∞∞∞∞\
12
+ | ಠ ಠ |
13
+ | == ︿ == |
14
+ \ /')
15
+
16
+ heads.push('
17
+ ^ ^
18
+ / \____/ \
19
+ / VVV \
20
+ | 。◕ ◕。 |
21
+ | == ‿‿ == |
22
+ \ /')
23
+ heads.push('
24
+ / \ / \
25
+ / ∆ \____/ ∆ \
26
+ / \
27
+ / (。♥) (。♥) \
28
+ \ * ▽ * /
29
+ \ ‿‿ /')
30
+ heads.push('
31
+ / \ / \
32
+ / ∆ \____/ ∆ \
33
+ / _ _ \
34
+ / (o) (o) \
35
+ \ ~~~ (*) ~~~ /
36
+ \ ^ /')
37
+ heads.push('
38
+ ^ ^
39
+ / \____/ \
40
+ / \
41
+ | ^ ---- ^ |
42
+ | |
43
+ \ /')
44
+ heads.push('
45
+ / \ / \
46
+ / \____/ \
47
+ / ... ... \
48
+ / ▽ ▽ \
49
+ \ =:= /
50
+ \ /')
51
+ bodies.push('
52
+ )============(
53
+ /> <\
54
+ /> | | | | <\
55
+ |> | | | | <|
56
+ \____OOO___OOO___/')
57
+ bodies.push('
58
+ )✧✧✧✧✧✧✧✧✧✧✧✧(
59
+ / \
60
+ | | | __ | | |
61
+ | OOO OOO |
62
+ | | | |
63
+ | \____/ |
64
+ \__OOO____OOO__/')
65
+ bodies.push('
66
+ )◆◇◆◇◆◇◆◇◆◇◆◇(
67
+ /◭ ◮\
68
+ /◭ | | | | ◮\
69
+ |◭ |◆◇| |◇◆| ◮|
70
+ \__OOO____OOO___/')
71
+ bodies.push('
72
+ (--------------)
73
+ (| | | | )
74
+ (-| |---| |--) ))))
75
+ ( | | | | ) ))
76
+ ( | | | | ) ))
77
+ (___()()()___()()()____)))))))))')
78
+ bodies.push('
79
+ )=====*======(
80
+ / ~ ~ \ /\
81
+ | | ~ |~ | \ \
82
+ | ~ | ~ | | \ \
83
+ /| | ~ | ~|\ / /
84
+ \| ~| ~ | |// /
85
+ /___/--------/___/__/')
86
+ bodies.push('
87
+ /=∞=∞=∞=∞=∞=∞=∞\
88
+ / \
89
+ | | | |
90
+ | | | |
91
+ \ \ / /
92
+ \___\------/___/
93
+ ')
94
+ heads[rand(heads.size)]+bodies[rand(bodies.size)]
95
+ end
96
+
97
+ def self.draw_human
98
+
99
+ hair = []
100
+ eyes = []
101
+ mouth = []
102
+ bodies = []
103
+
104
+ hair.push('
105
+ ______ ___
106
+ / \/ \
107
+ / \
108
+ | ___________ |')
109
+
110
+ hair.push('
111
+ /\/\/\/\/\/\/\/\
112
+ | |
113
+ | ___________ |')
114
+
115
+ eyes.push('
116
+ | | ___ ___ | |
117
+ | | (。◕) (。◕) | |')
118
+
119
+ eyes.push('
120
+ | | ___ ___ | |
121
+ | | (●。) (●。) | |')
122
+
123
+
124
+ mouth.push('
125
+ \| っ |/
126
+ | 〇 |
127
+ \_________/')
128
+
129
+ mouth.push('
130
+ \| ミ っ ミ |/
131
+ | ‿ |
132
+ \_________/')
133
+
134
+
135
+ bodies.push('
136
+ | |
137
+ ___=====___
138
+ / \
139
+ / | | \ ')
140
+ bodies.push('
141
+ | |
142
+ ___*****___
143
+ /-----------\
144
+ /--|-------|--\ ')
145
+
146
+ hair[rand(hair.size)]+eyes[rand(eyes.size)]+mouth[rand(mouth.size)]+bodies[rand(bodies.size)]
147
+
148
+ end
149
+
150
+ def self.dead_cat
151
+
152
+ dead_cat ='
153
+ / \ / \
154
+ / ∆ \____/ ∆ \
155
+ / \
156
+ / X X \
157
+ \ ~~ ▽ ~~ /
158
+ \ __ /
159
+ )============(
160
+ /* * * *\
161
+ / * | | | |* \
162
+ |* | | * | | *|
163
+ \____OOO___OOO___/'
164
+
165
+ end
166
+
167
+ end
168
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ascii_drawing_generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Emma Orhun
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description: Ruby gem that randomly generates cat and human ASCII drawings
56
+ email:
57
+ - emma.orhun@shopify.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/ascii_drawing_generator.rb
63
+ homepage: https://rubygems.org/ascii_drawing_generator
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.6.14
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: Random ASCII cat and human generator
87
+ test_files: []