giggle 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/giggle +5 -0
- data/lib/giggle.rb +25 -0
- metadata +46 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8b111b5dcb0e1b51d41a371ff58f7685e6dbb1ca
|
4
|
+
data.tar.gz: b65f3fb991947942fa2266aaa98827eb1ff0826b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b889ef093aef87c006b1d914fc5ea81c1bd79bdccd0c22c198b5e72381e8a10c107e877a509a471317381bb12b188389a0d3c73fc9f3574297d1a05835e4e11
|
7
|
+
data.tar.gz: 8c611fd9a2b4182e559d2457e1ca3233ec5dd52dba53567481c5c6f9045659d6579758b258c545fb043ec713bef1e5929e1372821cfa2ee0f5d981469fcd3ef2
|
data/bin/giggle
ADDED
data/lib/giggle.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
class Giggle
|
3
|
+
JOKES = [
|
4
|
+
"There are 2 hard problems in computer science: caching, naming, and off-by-1 errors",
|
5
|
+
"A programmer is going to the grocery store and his wife tells him, 'Buy a gallon of milk, and if there are eggs, buy a dozen.' So the programmer goes, buys everything, and drives back to his house. Upon arrival, his wife angrily asks him, 'Why did you get 13 gallons of milk?' The programmer says, 'There were eggs!'",
|
6
|
+
"Q: How many programmers does it take to screw in a light bulb?\nA: None. It's a hardware problem.",
|
7
|
+
"A programmer puts two glasses on his bedside table before going to sleep. A full one, in case he gets thirsty, and an empty one, in case he doesn’t.",
|
8
|
+
"99 little bugs in the code\n99 bugs in the code\npatch one down, compile it around\n117 bugs in the code!",
|
9
|
+
"In order to understand recursion you must first understand recursion.",
|
10
|
+
"There are only 10 kinds of people in this world: those who know binary and those who don’t.",
|
11
|
+
"Q: How do you tell an introverted computer scientist from an extroverted computer scientist?\nA: An extroverted computer scientist looks at your shoes when he talks to you.",
|
12
|
+
"Two bits walk into a bar for a byte.",
|
13
|
+
"Q: “Whats the object-oriented way to become wealthy?”\nA: Inheritance"
|
14
|
+
]
|
15
|
+
|
16
|
+
def self.start
|
17
|
+
puts "Hehe!"
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.random_joke
|
21
|
+
random = Random.new
|
22
|
+
random_array_index = random.rand(JOKES.length - 1)
|
23
|
+
JOKES[random_array_index]
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: giggle
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Barstow
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-02 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Returns a random programming joke
|
14
|
+
email: alexander.barstow@gmail.com
|
15
|
+
executables:
|
16
|
+
- giggle
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/giggle
|
21
|
+
- lib/giggle.rb
|
22
|
+
homepage: https://github.com/alex-barstow/giggle-gem
|
23
|
+
licenses:
|
24
|
+
- MIT
|
25
|
+
metadata: {}
|
26
|
+
post_install_message:
|
27
|
+
rdoc_options: []
|
28
|
+
require_paths:
|
29
|
+
- lib
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 2.4.5.1
|
43
|
+
signing_key:
|
44
|
+
specification_version: 4
|
45
|
+
summary: Hehe!
|
46
|
+
test_files: []
|