fandom-word 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/.gitattributes +5 -0
- data/.gitignore +3 -1
- data/.rspec +3 -0
- data/.rubocop.yml +16 -1
- data/.travis.yml +7 -0
- data/.yardoc/checksums +5 -0
- data/.yardoc/complete +0 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/Gemfile +18 -2
- data/README.md +15 -11
- data/Rakefile +61 -7
- data/data/words.data +0 -0
- data/doc/FandomWord.html +347 -0
- data/doc/FandomWord/FandomRandomizer.html +419 -0
- data/doc/FandomWord/FandomWordCatalog.html +424 -0
- data/doc/FandomWord/Fandoms.html +617 -0
- data/doc/_index.html +128 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +492 -0
- data/doc/file.README.html +121 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +121 -0
- data/doc/js/app.js +248 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +123 -0
- data/doc/top-level-namespace.html +110 -0
- data/fandom-word.gemspec +3 -3
- data/lib/fandom_word.rb +61 -17
- data/lib/fandom_word_catalog.rb +4 -1
- data/lib/fandoms.rb +43 -6
- data/lib/version.rb +2 -1
- metadata +30 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8292d6e758a0580f52ed94dfa3ddca294ee6f5ed
|
4
|
+
data.tar.gz: f8458d92461eceb480f4b9cef2ab74845ad169f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3612efa6c64bde71631e39858a7d1bd05c2853309afb9f0a7ccd1eb52b80d1b69e7760a23d8743c041ffa206daf27f04428f568369684fe6268afb4771f3d98b
|
7
|
+
data.tar.gz: edd8859f6b9e4fd2c5218eb13b1ec726896cfb6d01c4f6466fbeb6541dc73e3e0edf800a8313abc9724cdd8c9b0a7d031002e3d1de8e3592f598821797ce54de
|
data/.gitattributes
ADDED
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
CHANGED
@@ -1,3 +1,18 @@
|
|
1
1
|
AllCops:
|
2
2
|
Exclude:
|
3
|
-
- lib/fandom-word.rb
|
3
|
+
- lib/fandom-word.rb
|
4
|
+
|
5
|
+
Layout/EndOfLine:
|
6
|
+
Exclude:
|
7
|
+
- fandom-word.gemspec
|
8
|
+
- Gemfile
|
9
|
+
- Rakefile
|
10
|
+
- lib/**/*
|
11
|
+
- spec/**/*
|
12
|
+
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Exclude:
|
15
|
+
- spec/**/*
|
16
|
+
|
17
|
+
Metrics/LineLength:
|
18
|
+
Max: 120
|
data/.travis.yml
ADDED
data/.yardoc/checksums
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
lib/fandoms.rb 04e6759e58e6b973fe0d3fa0382197356e2f5c93
|
2
|
+
lib/version.rb e943b10f8f7edb26682016a692305e251f5481b9
|
3
|
+
lib/fandom-word.rb 9e292912f4cce8af8b2ad6b655df6e73931a6cc8
|
4
|
+
lib/fandom_word.rb 0d0359cf3ced737a2d9a69b204c348ba5f7cb5d7
|
5
|
+
lib/fandom_word_catalog.rb 6a0254bf451a21cf7f94a12caa70133673515856
|
data/.yardoc/complete
ADDED
File without changes
|
Binary file
|
Binary file
|
data/.yardoc/proxy_types
ADDED
Binary file
|
data/Gemfile
CHANGED
@@ -2,5 +2,21 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
4
|
|
5
|
-
|
6
|
-
gem '
|
5
|
+
group :build do
|
6
|
+
gem 'rake', '12.3.0'
|
7
|
+
gem 'yard', '0.9.9'
|
8
|
+
end
|
9
|
+
|
10
|
+
group :development do
|
11
|
+
gem 'pry', '0.10.4'
|
12
|
+
gem 'pry-nav', '0.2.4'
|
13
|
+
gem 'pry-stack_explorer', '0.4.9.2'
|
14
|
+
gem 'rubocop', '0.51.0'
|
15
|
+
end
|
16
|
+
|
17
|
+
group :test do
|
18
|
+
gem 'benchmark-ips', '2.7.2'
|
19
|
+
gem 'rspec', '3.7.0'
|
20
|
+
gem 'rspec-benchmark', '0.3.0'
|
21
|
+
gem 'simplecov', '0.15.1'
|
22
|
+
end
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
fandom-word
|
2
2
|
====
|
3
|
+
[](https://badge.fury.io/rb/fandom-word)
|
4
|
+
[](https://travis-ci.org/RaviN/fandom-word)
|
3
5
|
|
4
6
|
A fandom word generator that returns random words from various fandoms.
|
5
7
|
|
@@ -10,11 +12,13 @@ fandom-word allows you to get a randomized word pertaining to any fandom.
|
|
10
12
|
You can also use it to get a randomized word for a specific fandom.
|
11
13
|
|
12
14
|
```ruby
|
13
|
-
FandomWord.
|
14
|
-
FandomWord.
|
15
|
+
FandomWord.random_word # returns a word from any fandom category
|
16
|
+
FandomWord.random_word(fandom_name) # returns a word from a specific fandom
|
17
|
+
FandomWord.random_word([fandom_name_1, fandom_name_2]) # returns a word from one of the fandoms
|
18
|
+
FandomWord.fandoms # list fandoms
|
15
19
|
```
|
16
20
|
|
17
|
-
|
21
|
+
Available fandoms are defined as constants in `FandomWord::Fandoms`
|
18
22
|
|
19
23
|
Adding Fandoms
|
20
24
|
----
|
@@ -24,14 +28,14 @@ Adding Fandoms
|
|
24
28
|
* When adding your word list use the following format
|
25
29
|
```yaml
|
26
30
|
:categories:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
+
- list
|
32
|
+
- of
|
33
|
+
- applicable
|
34
|
+
- categories
|
31
35
|
:words:
|
32
|
-
|
33
|
-
|
34
|
-
|
36
|
+
- list
|
37
|
+
- of
|
38
|
+
- words
|
35
39
|
```
|
36
|
-
* Make sure all tests are still passing
|
40
|
+
* Make sure all tests are still passing and there is 100% code coverage
|
37
41
|
* Submit pull request
|
data/Rakefile
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
require 'ostruct'
|
2
|
-
|
2
|
+
|
3
|
+
# Require relative all library files. No require relatives should be necessary below the next couple lines
|
4
|
+
source_files_to_require = Dir['lib/**/*.rb']
|
5
|
+
source_files_to_require.each { |file_path| require_relative file_path }
|
3
6
|
|
4
7
|
task :default do
|
5
|
-
|
6
|
-
|
7
|
-
puts "RANDOM CATEGORY WORD: #{FandomWord.random_word}"
|
8
|
+
Rake::Task['pre_flight'].invoke
|
9
|
+
Rake::Task['demo'].invoke
|
8
10
|
end
|
9
11
|
|
12
|
+
desc 'Collects all word lists and compiles into words.data'
|
10
13
|
task :build_data do
|
11
14
|
require 'erb'
|
12
|
-
|
13
15
|
require 'yaml'
|
14
|
-
require_relative 'lib/fandom_word_catalog'
|
15
16
|
|
16
17
|
DATA_FILE = 'data/words.data'.freeze
|
17
18
|
WORD_LIST_GLOB = 'word-lists/**/*.yml'.freeze
|
@@ -21,7 +22,7 @@ task :build_data do
|
|
21
22
|
catalog = FandomWord::FandomWordCatalog.new
|
22
23
|
|
23
24
|
Dir.glob(WORD_LIST_GLOB) do |file_path|
|
24
|
-
puts "
|
25
|
+
puts "Adding to words.data: #{file_path}"
|
25
26
|
word_list = YAML.load_file(file_path)
|
26
27
|
word_list[:words].each do |word|
|
27
28
|
catalog.add_word(word, word_list[:categories])
|
@@ -42,3 +43,56 @@ task :build_data do
|
|
42
43
|
erb = Dummy.new(fandoms: catalog.fandoms)
|
43
44
|
File.write('lib/fandoms.rb', erb.render(File.read('build/fandoms.rb.erb')))
|
44
45
|
end
|
46
|
+
|
47
|
+
desc 'Perform a couple demonstrations of FandomWord'
|
48
|
+
task :demo do
|
49
|
+
puts "RANDOM MECHA WORD: #{FandomWord.random_word 'mecha'}"
|
50
|
+
puts "RANDOM ANIME WORD: #{FandomWord.random_word 'anime'}"
|
51
|
+
puts "RANDOM ANIME OR MECHA WORD: #{FandomWord.random_word %w[anime mecha]}"
|
52
|
+
puts "RANDOM WORD: #{FandomWord.random_word}"
|
53
|
+
end
|
54
|
+
|
55
|
+
desc 'Performs common checks / house keeping as a prerequisite before submitting a pull request'
|
56
|
+
task :pre_flight do
|
57
|
+
def system_helper(command)
|
58
|
+
raise "One of the pre flight steps failed! #{command}" unless system command
|
59
|
+
end
|
60
|
+
|
61
|
+
# Validate style is up to standards
|
62
|
+
system_helper 'bundle exec rubocop -DES'
|
63
|
+
|
64
|
+
# Validate all tests pass
|
65
|
+
system 'bundle exec rspec'
|
66
|
+
|
67
|
+
# Sort original word list alphabetically
|
68
|
+
Rake::Task['sort_word_lists'].invoke
|
69
|
+
|
70
|
+
# Build word data
|
71
|
+
Rake::Task['build_data'].invoke
|
72
|
+
|
73
|
+
# Document code
|
74
|
+
system 'bundle exec yard'
|
75
|
+
end
|
76
|
+
|
77
|
+
desc 'Get benchmark'
|
78
|
+
task :determine_benchmark_ips do
|
79
|
+
require 'benchmark/ips'
|
80
|
+
|
81
|
+
Benchmark.ips do |x|
|
82
|
+
x.config time: 5, warmup: 2
|
83
|
+
x.report('Get Random Word') { FandomWord.random_word }
|
84
|
+
x.compare!
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
desc 'Sort word list fandoms and words in alphabetical order'
|
89
|
+
task :sort_word_lists do
|
90
|
+
require 'yaml'
|
91
|
+
WORD_LIST_GLOB = 'word-lists/**/*.yml'.freeze
|
92
|
+
Dir.glob(WORD_LIST_GLOB) do |file_path|
|
93
|
+
puts "Sorting word list alphabetically: #{file_path}"
|
94
|
+
word_list = YAML.load_file file_path
|
95
|
+
word_list.each_value(&:sort!)
|
96
|
+
File.open(file_path, 'w') { |file| file.write word_list.to_yaml }
|
97
|
+
end
|
98
|
+
end
|
data/data/words.data
CHANGED
Binary file
|
data/doc/FandomWord.html
ADDED
@@ -0,0 +1,347 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Module: FandomWord
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.9
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "FandomWord";
|
19
|
+
relpath = '';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="_index.html">Index (F)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">FandomWord</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Module: FandomWord
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/fandom_word.rb<span class="defines">,<br />
|
82
|
+
lib/fandoms.rb,<br /> lib/version.rb,<br /> lib/fandom_word_catalog.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>Holds all classes and methods for Fandom Word</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="FandomWord/Fandoms.html" title="FandomWord::Fandoms (module)">Fandoms</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="FandomWord/FandomRandomizer.html" title="FandomWord::FandomRandomizer (class)">FandomRandomizer</a></span>, <span class='object_link'><a href="FandomWord/FandomWordCatalog.html" title="FandomWord::FandomWordCatalog (class)">FandomWordCatalog</a></span>
|
108
|
+
|
109
|
+
|
110
|
+
</p>
|
111
|
+
|
112
|
+
<h2>Constant Summary</h2>
|
113
|
+
<dl class="constants">
|
114
|
+
|
115
|
+
<dt id="VERSION-constant" class="">VERSION =
|
116
|
+
<div class="docstring">
|
117
|
+
<div class="discussion">
|
118
|
+
|
119
|
+
<p>Version of this gem</p>
|
120
|
+
|
121
|
+
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
<div class="tags">
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
</dt>
|
129
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.4.0</span><span class='tstring_end'>'</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
130
|
+
|
131
|
+
</dl>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
<h2>
|
141
|
+
Class Method Summary
|
142
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
143
|
+
</h2>
|
144
|
+
|
145
|
+
<ul class="summary">
|
146
|
+
|
147
|
+
<li class="public ">
|
148
|
+
<span class="summary_signature">
|
149
|
+
|
150
|
+
<a href="#fandoms-class_method" title="fandoms (class method)">.<strong>fandoms</strong> ⇒ Object </a>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</span>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
<span class="summary_desc"><div class='inline'>
|
165
|
+
<p>Returns the list of fandoms (categories).</p>
|
166
|
+
</div></span>
|
167
|
+
|
168
|
+
</li>
|
169
|
+
|
170
|
+
|
171
|
+
<li class="public ">
|
172
|
+
<span class="summary_signature">
|
173
|
+
|
174
|
+
<a href="#random_word-class_method" title="random_word (class method)">.<strong>random_word</strong>(fandom_name_or_names = nil) ⇒ String </a>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
</span>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
<span class="summary_desc"><div class='inline'>
|
189
|
+
<p>Returns random word from any fandom in catalog.</p>
|
190
|
+
</div></span>
|
191
|
+
|
192
|
+
</li>
|
193
|
+
|
194
|
+
|
195
|
+
</ul>
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<div id="class_method_details" class="method_details_list">
|
201
|
+
<h2>Class Method Details</h2>
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method_details first">
|
205
|
+
<h3 class="signature first" id="fandoms-class_method">
|
206
|
+
|
207
|
+
.<strong>fandoms</strong> ⇒ <tt>Object</tt>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
</h3><div class="docstring">
|
214
|
+
<div class="discussion">
|
215
|
+
|
216
|
+
<p>Returns the list of fandoms (categories)</p>
|
217
|
+
|
218
|
+
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
<div class="tags">
|
222
|
+
|
223
|
+
|
224
|
+
</div><table class="source_code">
|
225
|
+
<tr>
|
226
|
+
<td>
|
227
|
+
<pre class="lines">
|
228
|
+
|
229
|
+
|
230
|
+
19
|
231
|
+
20
|
232
|
+
21</pre>
|
233
|
+
</td>
|
234
|
+
<td>
|
235
|
+
<pre class="code"><span class="info file"># File 'lib/fandom_word.rb', line 19</span>
|
236
|
+
|
237
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fandoms'>fandoms</span>
|
238
|
+
<span class='const'><span class='object_link'><a href="FandomWord/FandomRandomizer.html" title="FandomWord::FandomRandomizer (class)">FandomRandomizer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_available_fandoms'>available_fandoms</span>
|
239
|
+
<span class='kw'>end</span></pre>
|
240
|
+
</td>
|
241
|
+
</tr>
|
242
|
+
</table>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="method_details ">
|
246
|
+
<h3 class="signature " id="random_word-class_method">
|
247
|
+
|
248
|
+
.<strong>random_word</strong>(fandom_name_or_names = nil) ⇒ <tt>String</tt>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
</h3><div class="docstring">
|
255
|
+
<div class="discussion">
|
256
|
+
|
257
|
+
<p>Returns random word from any fandom in catalog. Fandom category can be
|
258
|
+
specified.</p>
|
259
|
+
|
260
|
+
|
261
|
+
</div>
|
262
|
+
</div>
|
263
|
+
<div class="tags">
|
264
|
+
<p class="tag_title">Parameters:</p>
|
265
|
+
<ul class="param">
|
266
|
+
|
267
|
+
<li>
|
268
|
+
|
269
|
+
<span class='name'>fandom_name_or_names</span>
|
270
|
+
|
271
|
+
|
272
|
+
<span class='type'>(<tt>String</tt>, <tt>Array</tt>)</span>
|
273
|
+
|
274
|
+
|
275
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
276
|
+
|
277
|
+
|
278
|
+
—
|
279
|
+
<div class='inline'>
|
280
|
+
<p>Fandom category or array of categories</p>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
</li>
|
284
|
+
|
285
|
+
</ul>
|
286
|
+
|
287
|
+
<p class="tag_title">Returns:</p>
|
288
|
+
<ul class="return">
|
289
|
+
|
290
|
+
<li>
|
291
|
+
|
292
|
+
|
293
|
+
<span class='type'>(<tt>String</tt>)</span>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
—
|
298
|
+
<div class='inline'>
|
299
|
+
<p>Random word</p>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
</li>
|
303
|
+
|
304
|
+
</ul>
|
305
|
+
|
306
|
+
</div><table class="source_code">
|
307
|
+
<tr>
|
308
|
+
<td>
|
309
|
+
<pre class="lines">
|
310
|
+
|
311
|
+
|
312
|
+
10
|
313
|
+
11
|
314
|
+
12
|
315
|
+
13
|
316
|
+
14
|
317
|
+
15
|
318
|
+
16</pre>
|
319
|
+
</td>
|
320
|
+
<td>
|
321
|
+
<pre class="code"><span class="info file"># File 'lib/fandom_word.rb', line 10</span>
|
322
|
+
|
323
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_word'>random_word</span><span class='lparen'>(</span><span class='id identifier rubyid_fandom_name_or_names'>fandom_name_or_names</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
324
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_fandom_name_or_names'>fandom_name_or_names</span>
|
325
|
+
<span class='const'><span class='object_link'><a href="FandomWord/FandomRandomizer.html" title="FandomWord::FandomRandomizer (class)">FandomRandomizer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_random_word'>random_word</span> <span class='id identifier rubyid_fandom_name_or_names'>fandom_name_or_names</span>
|
326
|
+
<span class='kw'>else</span>
|
327
|
+
<span class='const'><span class='object_link'><a href="FandomWord/FandomRandomizer.html" title="FandomWord::FandomRandomizer (class)">FandomRandomizer</a></span></span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_random_word'>random_word</span>
|
328
|
+
<span class='kw'>end</span>
|
329
|
+
<span class='kw'>end</span></pre>
|
330
|
+
</td>
|
331
|
+
</tr>
|
332
|
+
</table>
|
333
|
+
</div>
|
334
|
+
|
335
|
+
</div>
|
336
|
+
|
337
|
+
</div>
|
338
|
+
|
339
|
+
<div id="footer">
|
340
|
+
Generated on Sun Nov 19 16:39:22 2017 by
|
341
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
342
|
+
0.9.9 (ruby-2.3.3).
|
343
|
+
</div>
|
344
|
+
|
345
|
+
</div>
|
346
|
+
</body>
|
347
|
+
</html>
|