fictionArt 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fictionArt.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c828072a3b009f552ce76cf5a61e78168953bde35d1c87ada0fff90ef3d0b0
|
4
|
+
data.tar.gz: 47f3f92c1f579f5238c17ea20b9fb0f8dade32ea68dd14d582d0afefcd6bdec2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04be91d8132b61b0e1b98ccada1f1c835e0865297d1ca4cc521df9523cbc35026a40f1f15cc55dc0c7fa7c5adf77368e21e743f347261c49f2bff49429d12aa3
|
7
|
+
data.tar.gz: 37edb9fbd22c9afe354c183118dc1637a546d18e5359f0585b9b5ac48d1bb961bd3b471a086a853dbc069e19a9f06a2be72a4fc4b1b7c79b34f65396a0ae3cdf
|
data/lib/fictionArt.rb
CHANGED
@@ -13,7 +13,7 @@ class FictionArt
|
|
13
13
|
def initialize(text = "nothing")
|
14
14
|
|
15
15
|
@image_chars ||= ' .~:+=o*x^%#@'.chars.to_a
|
16
|
-
check = Dir.glob("images/#{text}.jpg")
|
16
|
+
check = Dir.glob("#{__dir__}/../images/#{text}.jpg")
|
17
17
|
|
18
18
|
if check.length == 0
|
19
19
|
if text == "nothing"
|
@@ -97,9 +97,9 @@ class FictionArt
|
|
97
97
|
|
98
98
|
# Listing all currently possible characters
|
99
99
|
def list_all
|
100
|
-
list = Dir.glob("images/*.jpg")
|
100
|
+
list = Dir.glob("#{__dir__}/../images/*.jpg")
|
101
101
|
list.each do |character|
|
102
|
-
puts character
|
102
|
+
puts character[/.*images\/(.*).jpg/,1]
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
@@ -107,10 +107,10 @@ class FictionArt
|
|
107
107
|
# Checking matching characters from character inputted
|
108
108
|
def check_possible(text)
|
109
109
|
puts "Possible Characters:"
|
110
|
-
list = Dir.glob("images/*.jpg")
|
110
|
+
list = Dir.glob("#{__dir__}/../images/*.jpg")
|
111
111
|
|
112
112
|
list.each do |character|
|
113
|
-
character = character
|
113
|
+
character = character[/.*images\/(.*).jpg/,1]
|
114
114
|
if character.downcase.include? text.downcase
|
115
115
|
puts character
|
116
116
|
elsif text.downcase.include? character.downcase
|