hola_supahnickie 0.0.2 → 0.0.3
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/hola.rb +5 -13
- data/lib/hola/salutation.rb +35 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bee3eb9be3a37b74bf16f31d73d6acfecbf7776
|
4
|
+
data.tar.gz: 8ada5072aec064f4f9716fa8aa9944af6a03dd53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 926ee8de9079a79c2ea9158163e74d83b95a07381ca38c6a73f9934de3a868583068825242508bec0335419334df0683682471fc8d0d752898c5ec61440734d9
|
7
|
+
data.tar.gz: 9f242c543a66ecd817fe6d84e824f0ff04906ce74871e03e1c94a956427a5fe0daa4feeba4e7577ac6982a3d0bbf5d7687b34e66833e18ed7dec98b191455d33
|
data/lib/hola.rb
CHANGED
@@ -1,16 +1,8 @@
|
|
1
1
|
class Hola
|
2
|
-
def self.
|
3
|
-
|
4
|
-
|
5
|
-
case language
|
6
|
-
when 'english'
|
7
|
-
puts "Hello World"
|
8
|
-
when 'spanish'
|
9
|
-
puts "Hola mundo"
|
10
|
-
when 'cat'
|
11
|
-
puts "Nyan nyan!"
|
12
|
-
else
|
13
|
-
puts "That's not a real language in the normal sense of the word"
|
14
|
-
end
|
2
|
+
def self.greeting
|
3
|
+
salutation = Salutation.new
|
4
|
+
salutation.hi
|
15
5
|
end
|
16
6
|
end
|
7
|
+
|
8
|
+
require 'hola/salutation'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class Salutation
|
2
|
+
|
3
|
+
def hi
|
4
|
+
puts 'What type of salutation would you like to hear?'
|
5
|
+
salutation = gets.chomp.downcase
|
6
|
+
case salutation
|
7
|
+
when 'greeting'
|
8
|
+
puts "What language would you like to hear a greeting in?"
|
9
|
+
language = gets.chomp.downcase
|
10
|
+
case language
|
11
|
+
when 'english'
|
12
|
+
puts "Hello World"
|
13
|
+
when 'spanish'
|
14
|
+
puts "Hola mundo"
|
15
|
+
when 'cat'
|
16
|
+
puts "Nyan nyan!"
|
17
|
+
else
|
18
|
+
puts "That's not a real language in the normal sense of the word"
|
19
|
+
end
|
20
|
+
when 'goodbye'
|
21
|
+
puts "What language would you like to hear a goodbye in?"
|
22
|
+
language = gets.chomp.downcase
|
23
|
+
case language
|
24
|
+
when 'english'
|
25
|
+
puts "See ya!"
|
26
|
+
when 'spanish'
|
27
|
+
puts "Hasta luego"
|
28
|
+
when 'cat'
|
29
|
+
puts 'Nyan nyaaaaan~~!'
|
30
|
+
else
|
31
|
+
puts "I don't really know that many languages"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hola_supahnickie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Case
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/hola.rb
|
20
|
+
- lib/hola/salutation.rb
|
20
21
|
homepage: http://www.github.com/SupahNickie
|
21
22
|
licenses:
|
22
23
|
- MIT
|