medieval 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -1
- data/VERSION +1 -1
- data/lib/medieval/realm.rb +2 -1
- data/medieval.gemspec +31 -38
- data/rdoc/classes/Medieval/Battalion.html +282 -0
- data/rdoc/classes/Medieval/Realm.html +220 -0
- data/rdoc/classes/Medieval/Soldier.html +281 -0
- data/rdoc/files/lib/extras/array_rb.html +101 -0
- data/rdoc/files/lib/medieval/battalion_rb.html +110 -0
- data/rdoc/files/lib/medieval/realm_rb.html +101 -0
- data/rdoc/files/lib/medieval/soldier_rb.html +101 -0
- data/rdoc/files/lib/medieval_rb.html +111 -0
- metadata +38 -57
- data/.gitignore +0 -21
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/medieval/realm.rb
CHANGED
@@ -22,7 +22,8 @@ module Medieval
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def realm_suffix
|
25
|
-
%w(county realm ton land ville berg burgh borough bury view port mouth stad furt chester mouth fort haven side shire)
|
25
|
+
(%w(county realm ton land ville berg burgh borough bury view port mouth stad furt chester mouth fort haven side shire)
|
26
|
+
+ %w(sway sovereignty province)) .rand
|
26
27
|
end
|
27
28
|
|
28
29
|
|
data/medieval.gemspec
CHANGED
@@ -1,58 +1,51 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.5.
|
7
|
+
s.name = "medieval"
|
8
|
+
s.version = "0.5.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["rdinca"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2015-11-02"
|
13
|
+
s.description = "This is a medieval names generator, inspired by faker gem. In the future it will be used for an medieval online strategy game."
|
14
|
+
s.email = "radudinca@yahoo.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.rdoc"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
"test/test_medieval.rb"
|
21
|
+
"LICENSE",
|
22
|
+
"README.rdoc",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"lib/extras/array.rb",
|
26
|
+
"lib/medieval.rb",
|
27
|
+
"lib/medieval/attributes.rb",
|
28
|
+
"lib/medieval/battalion.rb",
|
29
|
+
"lib/medieval/realm.rb",
|
30
|
+
"lib/medieval/soldier.rb",
|
31
|
+
"medieval.gemspec",
|
32
|
+
"rdoc/classes/Medieval/Battalion.html",
|
33
|
+
"rdoc/classes/Medieval/Realm.html",
|
34
|
+
"rdoc/classes/Medieval/Soldier.html",
|
35
|
+
"rdoc/files/lib/extras/array_rb.html",
|
36
|
+
"rdoc/files/lib/medieval/battalion_rb.html",
|
37
|
+
"rdoc/files/lib/medieval/realm_rb.html",
|
38
|
+
"rdoc/files/lib/medieval/soldier_rb.html",
|
39
|
+
"rdoc/files/lib/medieval_rb.html",
|
40
|
+
"test/helper.rb",
|
41
|
+
"test/test_medieval.rb"
|
43
42
|
]
|
44
|
-
s.homepage =
|
45
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.homepage = "http://github.com/rdinca/medieval"
|
46
44
|
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version =
|
48
|
-
s.summary =
|
49
|
-
s.test_files = [
|
50
|
-
"test/test_medieval.rb",
|
51
|
-
"test/helper.rb"
|
52
|
-
]
|
45
|
+
s.rubygems_version = "1.8.25"
|
46
|
+
s.summary = "Medieval random names generator and more!"
|
53
47
|
|
54
48
|
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
49
|
s.specification_version = 3
|
57
50
|
|
58
51
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
@@ -0,0 +1,282 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Medieval::Battalion</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Medieval::Battalion</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/medieval/battalion_rb.html">
|
59
|
+
lib/medieval/battalion.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000007">ability</a>
|
90
|
+
<a href="#M000008">colour</a>
|
91
|
+
<a href="#M000004">creature_name</a>
|
92
|
+
<a href="#M000006">formation_name</a>
|
93
|
+
<a href="#M000003">name</a>
|
94
|
+
<a href="#M000005">name_of_order</a>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
|
98
|
+
</div>
|
99
|
+
|
100
|
+
|
101
|
+
<!-- if includes -->
|
102
|
+
|
103
|
+
<div id="section">
|
104
|
+
|
105
|
+
|
106
|
+
<div id="constants-list">
|
107
|
+
<h3 class="section-bar">Constants</h3>
|
108
|
+
|
109
|
+
<div class="name-list">
|
110
|
+
<table summary="Constants">
|
111
|
+
<tr class="top-aligned-row context-row">
|
112
|
+
<td class="context-item-name">FORMATS</td>
|
113
|
+
<td>=</td>
|
114
|
+
<td class="context-item-value">[ Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]}, Proc.new { ["The", name_of_order, formation_name, "of", ability, colour, creature_name]}, Proc.new { ["The", ability, colour, creature_name]}, Proc.new { ["The", name_of_order, formation_name, "of", ability, creature_name]}, Proc.new { ["The", name_of_order, formation_name, "of", colour, creature_name]}, Proc.new { ["The", colour, creature_name]}, Proc.new { ["The", ability , creature_name]}</td>
|
115
|
+
</tr>
|
116
|
+
</table>
|
117
|
+
</div>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if method_list -->
|
126
|
+
<div id="methods">
|
127
|
+
<h3 class="section-bar">Public Class methods</h3>
|
128
|
+
|
129
|
+
<div id="method-M000003" class="method-detail">
|
130
|
+
<a name="M000003"></a>
|
131
|
+
|
132
|
+
<div class="method-heading">
|
133
|
+
<a href="#M000003" class="method-signature">
|
134
|
+
<span class="method-name">name</span><span class="method-args">()</span>
|
135
|
+
</a>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div class="method-description">
|
139
|
+
<p><a class="source-toggle" href="#"
|
140
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
141
|
+
<div class="method-source-code" id="M000003-source">
|
142
|
+
<pre>
|
143
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 8</span>
|
144
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
145
|
+
<span class="ruby-constant">FORMATS</span>.<span class="ruby-identifier">rand</span>.<span class="ruby-identifier">call</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
146
|
+
<span class="ruby-keyword kw">end</span>
|
147
|
+
</pre>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<h3 class="section-bar">Protected Class methods</h3>
|
153
|
+
|
154
|
+
<div id="method-M000007" class="method-detail">
|
155
|
+
<a name="M000007"></a>
|
156
|
+
|
157
|
+
<div class="method-heading">
|
158
|
+
<a href="#M000007" class="method-signature">
|
159
|
+
<span class="method-name">ability</span><span class="method-args">()</span>
|
160
|
+
</a>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div class="method-description">
|
164
|
+
<p><a class="source-toggle" href="#"
|
165
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
166
|
+
<div class="method-source-code" id="M000007-source">
|
167
|
+
<pre>
|
168
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 26</span>
|
169
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ability</span>
|
170
|
+
[<span class="ruby-value str">"Agreeable"</span>, <span class="ruby-value str">"Amused"</span>, <span class="ruby-value str">"Brave"</span>, <span class="ruby-value str">"Calm"</span>, <span class="ruby-value str">"Charming"</span>, <span class="ruby-value str">"Cheerful"</span>, <span class="ruby-value str">"Comfortable"</span>, <span class="ruby-value str">"Cooperative"</span>, <span class="ruby-value str">"Courageous"</span>, <span class="ruby-value str">"Crazy"</span> <span class="ruby-value str">"Delightful"</span>, <span class="ruby-value str">"Determined"</span>, <span class="ruby-value str">"Eager"</span>, <span class="ruby-value str">"Elated"</span>, <span class="ruby-value str">"Enchanting"</span>, <span class="ruby-value str">"Encouraging"</span>, <span class="ruby-value str">"Energetic"</span>, <span class="ruby-value str">"Enthusiastic"</span>, <span class="ruby-value str">"Excited"</span>, <span class="ruby-value str">"Exuberant"</span>, <span class="ruby-value str">"Fair"</span>, <span class="ruby-value str">"Faithful"</span>, <span class="ruby-value str">"Fantastic"</span>, <span class="ruby-value str">"Fast"</span>, <span class="ruby-value str">"Fine"</span>, <span class="ruby-value str">"Friendly"</span>, <span class="ruby-value str">"Funny"</span>, <span class="ruby-value str">"Gentle"</span>, <span class="ruby-value str">"Glorious"</span>, <span class="ruby-value str">"Good"</span>, <span class="ruby-value str">"Great"</span> <span class="ruby-value str">"Happy"</span>, <span class="ruby-value str">"Healthy"</span>, <span class="ruby-value str">"Helpful"</span>, <span class="ruby-value str">"Hilarious"</span>, <span class="ruby-value str">"Jolly"</span>, <span class="ruby-value str">"Joyous"</span>, <span class="ruby-value str">"Kind"</span>, <span class="ruby-value str">"Lively"</span>, <span class="ruby-value str">"Lovely"</span>, <span class="ruby-value str">"Lucky"</span>, <span class="ruby-value str">"Nice"</span>, <span class="ruby-value str">"Obedient"</span>, <span class="ruby-value str">"Perfect"</span>, <span class="ruby-value str">"Pleasant"</span>, <span class="ruby-value str">"Poor"</span>, <span class="ruby-value str">"Proud"</span>, <span class="ruby-value str">"Relieved"</span>, <span class="ruby-value str">"Silly"</span>, <span class="ruby-value str">"Smiling"</span>, <span class="ruby-value str">"Splendid"</span>, <span class="ruby-value str">"Successful"</span>, <span class="ruby-value str">"Thankful"</span>, <span class="ruby-value str">"Thoughtful"</span>, <span class="ruby-value str">"Victorious"</span>, <span class="ruby-value str">"Vivacious"</span>, <span class="ruby-value str">"Witty"</span>, <span class="ruby-value str">"Wonderful"</span>, <span class="ruby-value str">"Zealous"</span>, <span class="ruby-value str">"Zany"</span>, <span class="ruby-value str">"Glamorous"</span>, <span class="ruby-value str">"Gleaming"</span>, <span class="ruby-value str">"Gorgeous"</span>, <span class="ruby-value str">"Graceful"</span>, <span class="ruby-value str">"Grotesque"</span>, <span class="ruby-value str">"Handsome"</span>, <span class="ruby-value str">"Homely"</span>, <span class="ruby-value str">"Light"</span>, <span class="ruby-value str">"Long"</span>, <span class="ruby-value str">"Magnificent"</span>, <span class="ruby-value str">"Misty"</span>, <span class="ruby-value str">"Motionless"</span>, <span class="ruby-value str">"Muddy"</span>, <span class="ruby-value str">"Old-fashioned"</span>, <span class="ruby-value str">"Plain"</span>, <span class="ruby-value str">"Poised"</span>, <span class="ruby-value str">"Precious"</span>, <span class="ruby-value str">"Quaint"</span>, <span class="ruby-value str">"Shiny"</span>, <span class="ruby-value str">"Smoggy"</span>, <span class="ruby-value str">"Sparkling"</span>, <span class="ruby-value str">"Spotless"</span>, <span class="ruby-value str">"Stormy"</span>, <span class="ruby-value str">"Strange"</span>, <span class="ruby-value str">"Ugly"</span>, <span class="ruby-value str">"Ugliest"</span>, <span class="ruby-value str">"Unsightly"</span>, <span class="ruby-value str">"Unusual"</span>, <span class="ruby-value str">"Wide-eyed"</span>, <span class="ruby-value str">"Adorable"</span>, <span class="ruby-value str">"Adventurous"</span>, <span class="ruby-value str">"Aggressive"</span>, <span class="ruby-value str">"Alert"</span>, <span class="ruby-value str">"Attractive"</span>, <span class="ruby-value str">"Average"</span>, <span class="ruby-value str">"Beautiful"</span>, <span class="ruby-value str">"Blue-eyed"</span>, <span class="ruby-value str">"Bloody"</span>, <span class="ruby-value str">"Blushing"</span>, <span class="ruby-value str">"Bright"</span>, <span class="ruby-value str">"Clean"</span>, <span class="ruby-value str">"Clear"</span>, <span class="ruby-value str">"Cloudy"</span>, <span class="ruby-value str">"Colorful"</span>, <span class="ruby-value str">"Crowded"</span>, <span class="ruby-value str">"Cute"</span>, <span class="ruby-value str">"Dark"</span>, <span class="ruby-value str">"Drab"</span>, <span class="ruby-value str">"Distinct"</span>, <span class="ruby-value str">"Dull"</span>, <span class="ruby-value str">"Elegant"</span>, <span class="ruby-value str">"Excited"</span>, <span class="ruby-value str">"Fancy"</span>, <span class="ruby-value str">"Filthy"</span>, <span class="ruby-value str">"Big"</span>, <span class="ruby-value str">"Colossal"</span>, <span class="ruby-value str">"Fat"</span>, <span class="ruby-value str">"Gigantic"</span>, <span class="ruby-value str">"Great"</span>, <span class="ruby-value str">"Huge"</span>, <span class="ruby-value str">"Immense"</span>, <span class="ruby-value str">"Large"</span>, <span class="ruby-value str">"Little"</span>, <span class="ruby-value str">"Mammoth"</span>, <span class="ruby-value str">"Massive"</span>, <span class="ruby-value str">"Miniature"</span>, <span class="ruby-value str">"Petite"</span>, <span class="ruby-value str">"Puny"</span>, <span class="ruby-value str">"Scrawny"</span>, <span class="ruby-value str">"Short"</span>, <span class="ruby-value str">"Small"</span>, <span class="ruby-value str">"Tall"</span>, <span class="ruby-value str">"Teeny"</span>, <span class="ruby-value str">"Teeny-tiny"</span>, <span class="ruby-value str">"Tinybroad"</span>, <span class="ruby-value str">"Chubby"</span>, <span class="ruby-value str">"Crooked"</span>, <span class="ruby-value str">"Curved"</span>, <span class="ruby-value str">"Deep"</span>, <span class="ruby-value str">"Flat"</span>, <span class="ruby-value str">"High"</span>, <span class="ruby-value str">"Hollow"</span>, <span class="ruby-value str">"Low"</span>, <span class="ruby-value str">"Narrow"</span>, <span class="ruby-value str">"Round"</span>, <span class="ruby-value str">"Shallow"</span>, <span class="ruby-value str">"Skinny"</span>, <span class="ruby-value str">"Square"</span>, <span class="ruby-value str">"Steep"</span>, <span class="ruby-value str">"Straight"</span>, <span class="ruby-value str">"Wide"</span>].<span class="ruby-identifier">rand</span>
|
171
|
+
|
172
|
+
<span class="ruby-keyword kw">end</span>
|
173
|
+
</pre>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div id="method-M000008" class="method-detail">
|
179
|
+
<a name="M000008"></a>
|
180
|
+
|
181
|
+
<div class="method-heading">
|
182
|
+
<a href="#M000008" class="method-signature">
|
183
|
+
<span class="method-name">colour</span><span class="method-args">()</span>
|
184
|
+
</a>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
<p><a class="source-toggle" href="#"
|
189
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
190
|
+
<div class="method-source-code" id="M000008-source">
|
191
|
+
<pre>
|
192
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 31</span>
|
193
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour</span>
|
194
|
+
<span class="ruby-node">%w( White Yellow Red Green Blue Black Orange Purple)</span>.<span class="ruby-identifier">rand</span>
|
195
|
+
<span class="ruby-keyword kw">end</span>
|
196
|
+
</pre>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div id="method-M000004" class="method-detail">
|
202
|
+
<a name="M000004"></a>
|
203
|
+
|
204
|
+
<div class="method-heading">
|
205
|
+
<a href="#M000004" class="method-signature">
|
206
|
+
<span class="method-name">creature_name</span><span class="method-args">()</span>
|
207
|
+
</a>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
<div class="method-description">
|
211
|
+
<p><a class="source-toggle" href="#"
|
212
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
213
|
+
<div class="method-source-code" id="M000004-source">
|
214
|
+
<pre>
|
215
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 13</span>
|
216
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">creature_name</span>
|
217
|
+
<span class="ruby-node">%w(Dragon Cyclop Wyvern Stud Dwarf Aardvark Buffalo Ant Anteater Antelope Ape Armadillo Donkey Baboon Badger Bat Bear Beaver Bee Bison Boar Bush Butterfly Camel Cat Cattle Chamois Cheetah Chicken Chimpanzee Cobra Cockroach Cormorant Coyote Crab Crane Crocodile Crow Deer Dog Dogfish Dolphin Dove Dragonfly Duck Dugong Eagle Echidna Eel Eland Elephant Elk Falcon Ferret Finch Fly Fox Frog Gaur Gazelle Gerbil Giant Panda Giraffe Gnu Goat Goose Gorilla Guanaco Guinea Gull Hamster Hare Hawk Hedgehog Heron Hippopotamus Hornet Horse Hyena Jackal Jaguar Jellyfish Kangaroo Komodo Kouprey Kudu Lark Lemur Leopard Lion Llama Loris Louse Lobster Lyrebird Magpie Mallard Manatee Meerkat Mink Mole Monkey Moose Mouse Mosquito Mule Nightingale Okapi Oryx Ostrich Otter Owl Ox Oyster Panther Partridge Peafowl Pelican Pig Pigeon Pony Porcupine Quelea Rabbit Raccoon Rail Ram Rat Raven RedDeer RedPanda Reindeer Rhinoceros Salamander Sealion Seal Seastar Shark Sheep Shrew Skunk Snail Snake Spider Squid Squirrel Swan Tapir Tarsier Tiger Toad Turkey Turtle Vicuna Walrus Wasp WaterBuffalo Weasel Whale Wolf Worm Yak Zebra)</span>.<span class="ruby-identifier">rand</span>.<span class="ruby-identifier">pluralize</span>
|
218
|
+
<span class="ruby-keyword kw">end</span>
|
219
|
+
</pre>
|
220
|
+
</div>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div id="method-M000006" class="method-detail">
|
225
|
+
<a name="M000006"></a>
|
226
|
+
|
227
|
+
<div class="method-heading">
|
228
|
+
<a href="#M000006" class="method-signature">
|
229
|
+
<span class="method-name">formation_name</span><span class="method-args">()</span>
|
230
|
+
</a>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
<div class="method-description">
|
234
|
+
<p><a class="source-toggle" href="#"
|
235
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
236
|
+
<div class="method-source-code" id="M000006-source">
|
237
|
+
<pre>
|
238
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 21</span>
|
239
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">formation_name</span>
|
240
|
+
<span class="ruby-node">%w(Battalion Legion Brigade Rank Pack Regiment Squadron Swarm Squad Division)</span>.<span class="ruby-identifier">rand</span>
|
241
|
+
<span class="ruby-keyword kw">end</span>
|
242
|
+
</pre>
|
243
|
+
</div>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
|
247
|
+
<div id="method-M000005" class="method-detail">
|
248
|
+
<a name="M000005"></a>
|
249
|
+
|
250
|
+
<div class="method-heading">
|
251
|
+
<a href="#M000005" class="method-signature">
|
252
|
+
<span class="method-name">name_of_order</span><span class="method-args">()</span>
|
253
|
+
</a>
|
254
|
+
</div>
|
255
|
+
|
256
|
+
<div class="method-description">
|
257
|
+
<p><a class="source-toggle" href="#"
|
258
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
259
|
+
<div class="method-source-code" id="M000005-source">
|
260
|
+
<pre>
|
261
|
+
<span class="ruby-comment cmt"># File lib/medieval/battalion.rb, line 17</span>
|
262
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name_of_order</span>
|
263
|
+
<span class="ruby-identifier">rand</span>(<span class="ruby-value">100</span>).<span class="ruby-identifier">ordinalize</span>
|
264
|
+
<span class="ruby-keyword kw">end</span>
|
265
|
+
</pre>
|
266
|
+
</div>
|
267
|
+
</div>
|
268
|
+
</div>
|
269
|
+
|
270
|
+
|
271
|
+
</div>
|
272
|
+
|
273
|
+
|
274
|
+
</div>
|
275
|
+
|
276
|
+
|
277
|
+
<div id="validator-badges">
|
278
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
279
|
+
</div>
|
280
|
+
|
281
|
+
</body>
|
282
|
+
</html>
|
@@ -0,0 +1,220 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Medieval::Realm</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Medieval::Realm</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/medieval/realm_rb.html">
|
59
|
+
lib/medieval/realm.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000018">land_name</a>
|
90
|
+
<a href="#M000016">main_name</a>
|
91
|
+
<a href="#M000015">name</a>
|
92
|
+
<a href="#M000017">suffix</a>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
|
96
|
+
</div>
|
97
|
+
|
98
|
+
|
99
|
+
<!-- if includes -->
|
100
|
+
|
101
|
+
<div id="section">
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<!-- if method_list -->
|
111
|
+
<div id="methods">
|
112
|
+
<h3 class="section-bar">Public Class methods</h3>
|
113
|
+
|
114
|
+
<div id="method-M000015" class="method-detail">
|
115
|
+
<a name="M000015"></a>
|
116
|
+
|
117
|
+
<div class="method-heading">
|
118
|
+
<a href="#M000015" class="method-signature">
|
119
|
+
<span class="method-name">name</span><span class="method-args">()</span>
|
120
|
+
</a>
|
121
|
+
</div>
|
122
|
+
|
123
|
+
<div class="method-description">
|
124
|
+
<p><a class="source-toggle" href="#"
|
125
|
+
onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000015-source">
|
127
|
+
<pre>
|
128
|
+
<span class="ruby-comment cmt"># File lib/medieval/realm.rb, line 5</span>
|
129
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">name</span>
|
130
|
+
<span class="ruby-identifier">main_name</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">suffix</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">land_name</span>
|
131
|
+
<span class="ruby-keyword kw">end</span>
|
132
|
+
</pre>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<h3 class="section-bar">Protected Class methods</h3>
|
138
|
+
|
139
|
+
<div id="method-M000018" class="method-detail">
|
140
|
+
<a name="M000018"></a>
|
141
|
+
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="#M000018" class="method-signature">
|
144
|
+
<span class="method-name">land_name</span><span class="method-args">()</span>
|
145
|
+
</a>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<div class="method-description">
|
149
|
+
<p><a class="source-toggle" href="#"
|
150
|
+
onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
|
151
|
+
<div class="method-source-code" id="M000018-source">
|
152
|
+
<pre>
|
153
|
+
<span class="ruby-comment cmt"># File lib/medieval/realm.rb, line 18</span>
|
154
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">land_name</span>
|
155
|
+
<span class="ruby-node">%w(land county shire realm)</span>.<span class="ruby-identifier">rand</span>
|
156
|
+
<span class="ruby-keyword kw">end</span>
|
157
|
+
</pre>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div id="method-M000016" class="method-detail">
|
163
|
+
<a name="M000016"></a>
|
164
|
+
|
165
|
+
<div class="method-heading">
|
166
|
+
<a href="#M000016" class="method-signature">
|
167
|
+
<span class="method-name">main_name</span><span class="method-args">()</span>
|
168
|
+
</a>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div class="method-description">
|
172
|
+
<p><a class="source-toggle" href="#"
|
173
|
+
onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
|
174
|
+
<div class="method-source-code" id="M000016-source">
|
175
|
+
<pre>
|
176
|
+
<span class="ruby-comment cmt"># File lib/medieval/realm.rb, line 10</span>
|
177
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">main_name</span>
|
178
|
+
<span class="ruby-node">%w(Dragon Cyclop Wyvern Stud Dwarf Aardvark Buffalo Ant Anteater Antelope Ape Armadillo Donkey Baboon Badger Bat Bear Beaver Bee Bison Boar Bush Butterfly Camel Cat Cattle Chamois Cheetah Chicken Chimpanzee Cobra Cockroach Cormorant Coyote Crab Crane Crocodile Crow Deer Dog Dogfish Dolphin Dove Dragonfly Duck Dugong Eagle Echidna Eel Eland Elephant Elk Falcon Ferret Finch Fly Fox Frog Gaur Gazelle Gerbil Giant Panda Giraffe Gnu Goat Goose Gorilla Guanaco Guinea Gull Hamster Hare Hawk Hedgehog Heron Hippopotamus Hornet Horse Hyena Jackal Jaguar Jellyfish Kangaroo Komodo Kouprey Kudu Lark Lemur Leopard Lion Llama Loris Louse Lobster Lyrebird Magpie Mallard Manatee Meerkat Mink Mole Monkey Moose Mouse Mosquito Mule Nightingale Okapi Oryx Ostrich Otter Owl Ox Oyster Panther Partridge Peafowl Pelican Pig Pigeon Pony Porcupine Quelea Rabbit Raccoon Rail Ram Rat Raven RedDeer RedPanda Reindeer Rhinoceros Salamander Sealion Seal Seastar Shark Sheep Shrew Skunk Snail Snake Spider Squid Squirrel Swan Tapir Tarsier Tiger Toad Turkey Turtle Vicuna Walrus Wasp WaterBuffalo Weasel Whale Wolf Worm Yak Zebra)</span>.<span class="ruby-identifier">rand</span>.<span class="ruby-identifier">slice</span>(<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-operator">-</span>(<span class="ruby-identifier">rand</span>(<span class="ruby-value">2</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span>))
|
179
|
+
<span class="ruby-keyword kw">end</span>
|
180
|
+
</pre>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
<div id="method-M000017" class="method-detail">
|
186
|
+
<a name="M000017"></a>
|
187
|
+
|
188
|
+
<div class="method-heading">
|
189
|
+
<a href="#M000017" class="method-signature">
|
190
|
+
<span class="method-name">suffix</span><span class="method-args">()</span>
|
191
|
+
</a>
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div class="method-description">
|
195
|
+
<p><a class="source-toggle" href="#"
|
196
|
+
onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
|
197
|
+
<div class="method-source-code" id="M000017-source">
|
198
|
+
<pre>
|
199
|
+
<span class="ruby-comment cmt"># File lib/medieval/realm.rb, line 14</span>
|
200
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">suffix</span>
|
201
|
+
<span class="ruby-node">%w(oin yar oyd aire atya uti aro yal iha)</span>.<span class="ruby-identifier">rand</span>
|
202
|
+
<span class="ruby-keyword kw">end</span>
|
203
|
+
</pre>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
|
215
|
+
<div id="validator-badges">
|
216
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
217
|
+
</div>
|
218
|
+
|
219
|
+
</body>
|
220
|
+
</html>
|