magic_8_ball 0.0.0

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 (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/magic_8_ball.rb +26 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 07d6cc58a95b4ad2dc1276e9b312863eb281c352
4
+ data.tar.gz: dce3f003117b3bd6e910a7e900ec7fbe80ce3138
5
+ SHA512:
6
+ metadata.gz: 9d81d6bd94ee12f672b617c5d49f13f2f6f5314ff340d5b73beabedb75c83e94a56ef98f6c0f13663b0691de62b5ececf409716b3ff276c4a687694e2aa3274f
7
+ data.tar.gz: 50d1108f75d5e08f9528a03ebb0e4262231ef29f74be12a8a5b849eac0a6384adc090d33ff6b66ba7414b17f8e722953065657588169d25fe773637ba6a34c75
@@ -0,0 +1,26 @@
1
+ # lib/magic_8_ball.rb
2
+ class Magic8Ball
3
+ POSITIVE = ['It is certain', 'It is decidedly so', 'Without a doubt',
4
+ 'Yes, definitely', 'You may rely on it', 'As I see it, yes',
5
+ 'Most likely', 'Outlook good', 'Yes', 'Signs point to yes']
6
+ NEGATIVE = ["Don't count on it", 'My reply is no', 'My sources say no',
7
+ 'Outlook not so good', 'Very doubtful']
8
+ NEUTRAL = ['Reply hazy try again', 'Ask again later',
9
+ 'Better not tell you now', 'Cannot predict now',
10
+ 'Concentrate and ask again']
11
+ def self.positive_answer
12
+ POSITIVE.sample
13
+ end
14
+
15
+ def self.negative_answer
16
+ NEGATIVE.sample
17
+ end
18
+
19
+ def self.neutral_answer
20
+ NEUTRAL.sample
21
+ end
22
+
23
+ def self.answer
24
+ (POSITIVE + NEGATIVE + NEUTRAL).sample
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: magic_8_ball
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Caleb Sayre
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-05-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Returns a Magic 8-Ball answer
14
+ email: DrSayre2002@yahoo.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/magic_8_ball.rb
20
+ homepage: http://rubygems.org/gems/magic_8_ball
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubyforge_project:
40
+ rubygems_version: 2.4.3
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Magic 8-Ball
44
+ test_files: []