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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hola.rb +5 -13
  3. data/lib/hola/salutation.rb +35 -0
  4. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea8cb78fcccbd834b7e04364d1615ce8be2fbbe7
4
- data.tar.gz: db35403b09aeb946a81ce3c543b4316a77252767
3
+ metadata.gz: 4bee3eb9be3a37b74bf16f31d73d6acfecbf7776
4
+ data.tar.gz: 8ada5072aec064f4f9716fa8aa9944af6a03dd53
5
5
  SHA512:
6
- metadata.gz: 7624b5d51eca3a7aa755989893be28a51c51bb65742584274813eb47df9e1e6cfba44d54b39060bacf7d2f2e31ef3a14645f8546e5dd585e9a59348a99d7299e
7
- data.tar.gz: 07b76cd2f7e91e259c99f560acffa381348a6505fdd0fcfbac5b8b7809961c81c3b6e5b44281fba21072e7bc00f723b1cfd28f009b7945df4fe3852ef2cff31d
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.hi
3
- puts 'What language would you like to hear a greeting in?'
4
- language = gets.chomp.downcase
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.2
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