random_word 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f0f591d356d1b2b44c1c9d0c8ec8e341b3c47ec6
4
+ data.tar.gz: ad41ce7c5c211799ddb5663600db1a98475d3051
5
+ SHA512:
6
+ metadata.gz: 37b230f6e6917c37c2efd60933d334e7ae695b59110a7634435fe4980f4bbd0150c5d1e0dcc03811f27f96a0c8c833b7ff741809446c222d0d5eca6dd8b8b555
7
+ data.tar.gz: 42a2613bd9fb803116ba643aaeb861f589dcdb5b311653b08164ee5d28bfacb1da0b20660855d66c9ef94c286bfa2245dcf454750192dfd066785207e588391a
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ n�'L���M!ԛ��P%|��f�A�X,�+�o��G��ڭ{1[u«�~�G5��U� P��jP�n�<ZF8��O&��Pޚ��*�X!>R���K��� u�4n������\���19*�ړ�o6DM�9�n�g�e�t�ǫt
2
+ Q�"�����ij�ccW �ه�:��`�A 3� �v�
data.tar.gz.sig ADDED
Binary file
data/data/adjs.dat ADDED
Binary file
data/data/nouns.dat ADDED
Binary file
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: random_word.rb
4
+
5
+ # desc: Returns a random word
6
+
7
+
8
+ class RandomWord
9
+
10
+ class << self
11
+
12
+ def adjs() @adjs ||= load_data 'adjs.dat' end
13
+ def nouns() @nouns ||= load_data 'nouns.dat' end
14
+
15
+ def load_data(filename)
16
+
17
+ filepath = File.join(File.dirname(__FILE__), '..', 'data', filename)
18
+ File.open(filepath){|f| Marshal.load(f)}.shuffle.to_enum
19
+
20
+ end
21
+
22
+ end
23
+
24
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: random_word
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bind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t+bLnuMg
28
+ YahUZAke0vjfCR3jYDSiy0DpR3zn1K5qi1IS5Ih1iVfPd25L3XqeI7IGf1jOMrcZ
29
+ GdEI33GB/0A2iJVKPcl7iq0qtstOwXp5IcVb+2j9/AF0RoreEIKgNcpvZrLBDD9I
30
+ hJeImzNogi717OYHHBpV614iFV82jHY3JGBxmDGcY6H8ScG1kczTkGpiJLxiZQGw
31
+ v2Qwx7E4oTdBUgN3ElB1eDi0gg4NErOxUm+bxFAmzOZUkkOYJEsDiBIxTwf0yvI4
32
+ 9eKeQf41xmIjlg==
33
+ -----END CERTIFICATE-----
34
+ date: 2017-10-13 00:00:00.000000000 Z
35
+ dependencies: []
36
+ description:
37
+ email: james@jamesrobertson.eu
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files: []
41
+ files:
42
+ - data/adjs.dat
43
+ - data/nouns.dat
44
+ - lib/random_word.rb
45
+ homepage: https://github.com/jrobertson/random_word
46
+ licenses:
47
+ - MIT
48
+ metadata: {}
49
+ post_install_message:
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubyforge_project:
65
+ rubygems_version: 2.6.13
66
+ signing_key:
67
+ specification_version: 4
68
+ summary: Generates a random word. Credit goes to the authors of the random-word gem
69
+ test_files: []
metadata.gz.sig ADDED
Binary file