words_and_idioms 0.2.0 → 0.2.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51c2cacea850658aafbd010cded38164bc130c3c
|
|
4
|
+
data.tar.gz: 2bf769f3ac117e134f294beae45df9de55f3be40
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e20165d0e7b51f88ea4673489f8a18feec57138069c56fb576bbade8a6ad91af79f1eb687758cdd47222c24b42cb6740e33229010c340e8a79a537075fd6df71
|
|
7
|
+
data.tar.gz: ac6fe26ce45223e192e875d0379a7eb74a48eb6bf1c5c32f585d07cbf1b33e706bc0ab00892686a10f5905efab5f813b9fa6437deda120334124550c5770ec0e
|
|
@@ -3,19 +3,19 @@ class IdiomExplorer
|
|
|
3
3
|
def self.print_list
|
|
4
4
|
puts "Below is a list of newly created idioms from MacMillan's Open Dictionary Project"
|
|
5
5
|
IdiomScraper.all.each.with_index(1) do |idiom, i|
|
|
6
|
-
puts "#{i}. #{idiom}"
|
|
6
|
+
puts "#{i}. #{idiom.name}"
|
|
7
7
|
end
|
|
8
8
|
show_idiom
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def show_idiom
|
|
11
|
+
def self.show_idiom
|
|
12
12
|
puts "Which idiom would you like me to define?"
|
|
13
13
|
puts " "
|
|
14
14
|
input = ((gets.chomp).to_i - 1)
|
|
15
15
|
puts " "
|
|
16
16
|
puts "Interesting choice. Here is the definition:".magenta
|
|
17
17
|
puts " "
|
|
18
|
-
puts IdiomScraper.all[input].name.upcase.yellow
|
|
18
|
+
puts "#{IdiomScraper.all[input].name.upcase.yellow}: #{IdiomScraper.all[input].definition}"
|
|
19
19
|
puts " "
|
|
20
20
|
puts "Would you like to see this word in context?".light_blue
|
|
21
21
|
puts "Y/N"
|
|
@@ -23,7 +23,7 @@ class IdiomExplorer
|
|
|
23
23
|
context = gets.chomp.downcase
|
|
24
24
|
if context == "y"
|
|
25
25
|
puts " "
|
|
26
|
-
puts IdiomScraper.all[input].usage
|
|
26
|
+
puts IdiomScraper.all[input].usage.green
|
|
27
27
|
puts " "
|
|
28
28
|
end
|
|
29
29
|
end
|