Skip to content

Commit 7eb2deb

Browse files
committed
update docs
1 parent 66a6ded commit 7eb2deb

File tree

4 files changed

+94
-113
lines changed

4 files changed

+94
-113
lines changed

docs/array.html

Lines changed: 74 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ <h1 class="class_name">Array</h1>
100100
<h2>Description</h2>
101101
<hr />
102102
<div><p>ArrayObject represents instance from Array class.
103-
An array is a collection of different objects that are ordered and indexed.
104-
Elements in an array can belong to any class.</p>
103+
An array is a collection of different objects that are ordered and indexed.
104+
Elements in an array can belong to any class.</p>
105105
</div>
106106

107107
<h2>Instance Methods</h2>
@@ -112,13 +112,12 @@ <h4 class="method">
112112
<span class="title">[]</span>
113113
</h4>
114114
<div class="method-comment"><p>Retrieves an object in an array using Integer index.
115-
The index starts from 0. It returns <code>null</code> if the given index is bigger than its size.
116-
//</p>
115+
The index starts from 0. It returns <code>null</code> if the given index is bigger than its size.</p>
117116

118-
<pre><code class="language-ruby">a = [1, 2, 3, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
119-
a[0] # =&gt; 1
120-
a[3] # =&gt; &quot;a&quot;
121-
a[10] # =&gt; null
117+
<pre><code class="language-ruby"> a = [1, 2, 3, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
118+
a[0] # =&gt; 1
119+
a[3] # =&gt; &quot;a&quot;
120+
a[10] # =&gt; null
122121
</code></pre>
123122
</div>
124123
<p class="source">
@@ -132,14 +131,13 @@ <h4 class="method">
132131
<span class="title">[]=</span>
133132
</h4>
134133
<div class="method-comment"><p>Assigns value to an array. It requires an index and a value as argument.
135-
The array will expand if the assigned index is bigger than its size.
136-
Returns the assigned value.
137-
//</p>
134+
The array will expand if the assigned index is bigger than its size.
135+
Returns the assigned value.</p>
138136

139-
<pre><code class="language-ruby">a = []
140-
a[0] = 10 # =&gt; 10
141-
a[3] = 20 # =&gt; 20
142-
a # =&gt; [10, null, null, 20]
137+
<pre><code class="language-ruby"> a = []
138+
a[0] = 10 # =&gt; 10
139+
a[3] = 20 # =&gt; 20
140+
a # =&gt; [10, null, null, 20]
143141
</code></pre>
144142
</div>
145143
<p class="source">
@@ -152,10 +150,9 @@ <h4 class="method">
152150
<span class="prefix">#</span>
153151
<span class="title">length</span>
154152
</h4>
155-
<div class="method-comment"><p>Returns the length of the array.
156-
//</p>
153+
<div class="method-comment"><p>Returns the length of the array.</p>
157154

158-
<pre><code class="language-ruby">[1, 2, 3].length # =&gt; 3
155+
<pre><code class="language-ruby"> [1, 2, 3].length # =&gt; 3
159156
</code></pre>
160157
</div>
161158
<p class="source">
@@ -168,12 +165,11 @@ <h4 class="method">
168165
<span class="prefix">#</span>
169166
<span class="title">pop</span>
170167
</h4>
171-
<div class="method-comment"><p>Removes the last element in the array and returns it.
172-
//</p>
168+
<div class="method-comment"><p>Removes the last element in the array and returns it.</p>
173169

174-
<pre><code class="language-ruby">a = [1, 2, 3]
175-
a.pop # =&gt; 3
176-
a # =&gt; [1, 2]
170+
<pre><code class="language-ruby"> a = [1, 2, 3]
171+
a.pop # =&gt; 3
172+
a # =&gt; [1, 2]
177173
</code></pre>
178174
</div>
179175
<p class="source">
@@ -186,11 +182,10 @@ <h4 class="method">
186182
<span class="prefix">#</span>
187183
<span class="title">push</span>
188184
</h4>
189-
<div class="method-comment"><p>Appends the given object to the array and returns the array.
190-
//</p>
185+
<div class="method-comment"><p>Appends the given object to the array and returns the array.</p>
191186

192-
<pre><code class="language-ruby">a = [1, 2, 3]
193-
a.push(4) # =&gt; [1, 2, 3, 4]
187+
<pre><code class="language-ruby"> a = [1, 2, 3]
188+
a.push(4) # =&gt; [1, 2, 3, 4]
194189
</code></pre>
195190
</div>
196191
<p class="source">
@@ -203,12 +198,11 @@ <h4 class="method">
203198
<span class="prefix">#</span>
204199
<span class="title">shift</span>
205200
</h4>
206-
<div class="method-comment"><p>Removes the first element in the array and returns it.
207-
//</p>
201+
<div class="method-comment"><p>Removes the first element in the array and returns it.</p>
208202

209-
<pre><code class="language-ruby">a = [1, 2, 3]
210-
a.shift # =&gt; 1
211-
a # =&gt; [2, 3]
203+
<pre><code class="language-ruby"> a = [1, 2, 3]
204+
a.shift # =&gt; 1
205+
a # =&gt; [2, 3]
212206
</code></pre>
213207
</div>
214208
<p class="source">
@@ -221,17 +215,16 @@ <h4 class="method">
221215
<span class="prefix">#</span>
222216
<span class="title">each</span>
223217
</h4>
224-
<div class="method-comment"><p>Loop through each element with the given block.
225-
//</p>
218+
<div class="method-comment"><p>Loop through each element with the given block.</p>
219+
220+
<pre><code class="language-ruby"> a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
226221

227-
<pre><code class="language-ruby">a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
228-
//
229-
a.each do |e|
230-
puts(e + e)
231-
end
232-
# =&gt; &quot;aa&quot;
233-
# =&gt; &quot;bb&quot;
234-
# =&gt; &quot;cc&quot;
222+
a.each do |e|
223+
puts(e + e)
224+
end
225+
# =&gt; &quot;aa&quot;
226+
# =&gt; &quot;bb&quot;
227+
# =&gt; &quot;cc&quot;
235228
</code></pre>
236229
</div>
237230
<p class="source">
@@ -255,15 +248,14 @@ <h4 class="method">
255248
<span class="prefix">#</span>
256249
<span class="title">map</span>
257250
</h4>
258-
<div class="method-comment"><p>Loop through each element with the given block. Return a new array with each yield element.
259-
//</p>
251+
<div class="method-comment"><p>Loop through each element with the given block. Return a new array with each yield element.</p>
252+
253+
<pre><code class="language-ruby"> a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
260254

261-
<pre><code class="language-ruby">a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
262-
//
263-
a.map do |e|
264-
e + e
265-
end
266-
# =&gt; [&quot;aa&quot;, &quot;bb&quot;, &quot;cc&quot;]
255+
a.map do |e|
256+
e + e
257+
end
258+
# =&gt; [&quot;aa&quot;, &quot;bb&quot;, &quot;cc&quot;]
267259
</code></pre>
268260
</div>
269261
<p class="source">
@@ -277,15 +269,14 @@ <h4 class="method">
277269
<span class="title">select</span>
278270
</h4>
279271
<div class="method-comment"><p>Loop through each element with the given block.
280-
Return a new array with each element that returns true from yield.
281-
//</p>
272+
Return a new array with each element that returns true from yield.</p>
282273

283-
<pre><code class="language-ruby">a = [1, 2, 3, 4, 5]
284-
//
285-
a.select do |e|
286-
e + 1 &gt; 3
287-
end
288-
# =&gt; [3, 4, 5]
274+
<pre><code class="language-ruby"> a = [1, 2, 3, 4, 5]
275+
276+
a.select do |e|
277+
e + 1 &gt; 3
278+
end
279+
# =&gt; [3, 4, 5]
289280
</code></pre>
290281
</div>
291282
<p class="source">
@@ -299,12 +290,11 @@ <h4 class="method">
299290
<span class="title">at</span>
300291
</h4>
301292
<div class="method-comment"><p>Retrieves an object in an array using the index argument.
302-
It raises an error if index out of range.
303-
//</p>
293+
It raises an error if index out of range.</p>
304294

305-
<pre><code class="language-ruby">a = [1, 2, 3]
306-
a.at(0) # =&gt; 1
307-
a.at(10) # =&gt; Error
295+
<pre><code class="language-ruby"> a = [1, 2, 3]
296+
a.at(0) # =&gt; 1
297+
a.at(10) # =&gt; Error
308298
</code></pre>
309299
</div>
310300
<p class="source">
@@ -317,12 +307,11 @@ <h4 class="method">
317307
<span class="prefix">#</span>
318308
<span class="title">clear</span>
319309
</h4>
320-
<div class="method-comment"><p>Removes all elements in the array and returns an empty array.
321-
//</p>
310+
<div class="method-comment"><p>Removes all elements in the array and returns an empty array.</p>
322311

323-
<pre><code class="language-ruby">a = [1, 2, 3]
324-
a.clear # =&gt; []
325-
a # =&gt; []
312+
<pre><code class="language-ruby"> a = [1, 2, 3]
313+
a.clear # =&gt; []
314+
a # =&gt; []
326315
</code></pre>
327316
</div>
328317
<p class="source">
@@ -335,12 +324,11 @@ <h4 class="method">
335324
<span class="prefix">#</span>
336325
<span class="title">concat</span>
337326
</h4>
338-
<div class="method-comment"><p>Appends any number of argument to the array.
339-
//</p>
327+
<div class="method-comment"><p>Appends any number of argument to the array.</p>
340328

341-
<pre><code class="language-ruby">a = [1, 2, 3]
342-
a.concat(4, 5, 6)
343-
a # =&gt; [1, 2, 3, 4, 5, 6]
329+
<pre><code class="language-ruby"> a = [1, 2, 3]
330+
a.concat(4, 5, 6)
331+
a # =&gt; [1, 2, 3, 4, 5, 6]
344332
</code></pre>
345333
</div>
346334
<p class="source">
@@ -354,15 +342,14 @@ <h4 class="method">
354342
<span class="title">count</span>
355343
</h4>
356344
<div class="method-comment"><p>Loop through each element with the given block.
357-
Return the sum of elements that return true from yield.
358-
//</p>
345+
Return the sum of elements that return true from yield.</p>
346+
347+
<pre><code class="language-ruby"> a = [1, 2, 3, 4, 5]
359348

360-
<pre><code class="language-ruby">a = [1, 2, 3, 4, 5]
361-
//
362-
a.count do |e|
363-
e * 2 &gt; 3
364-
end
365-
# =&gt; 4
349+
a.count do |e|
350+
e * 2 &gt; 3
351+
end
352+
# =&gt; 4
366353
</code></pre>
367354
</div>
368355
<p class="source">
@@ -376,14 +363,13 @@ <h4 class="method">
376363
<span class="title">rotate</span>
377364
</h4>
378365
<div class="method-comment"><p>Returns a new array by putting the desired element as the first element.
379-
Use integer index as an argument to retrieve the element.
380-
//</p>
366+
Use integer index as an argument to retrieve the element.</p>
367+
368+
<pre><code class="language-ruby"> a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]
381369

382-
<pre><code class="language-ruby">a = [&quot;a&quot;, &quot;b&quot;, &quot;c&quot;, &quot;d&quot;]
383-
//
384-
a.rotate # =&gt; [&quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;a&quot;]
385-
a.rotate(2) # =&gt; [&quot;c&quot;, &quot;d&quot;, &quot;a&quot;, &quot;b&quot;]
386-
a.rotate(3) # =&gt; [&quot;d&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
370+
a.rotate # =&gt; [&quot;b&quot;, &quot;c&quot;, &quot;d&quot;, &quot;a&quot;]
371+
a.rotate(2) # =&gt; [&quot;c&quot;, &quot;d&quot;, &quot;a&quot;, &quot;b&quot;]
372+
a.rotate(3) # =&gt; [&quot;d&quot;, &quot;a&quot;, &quot;b&quot;, &quot;c&quot;]
387373
</code></pre>
388374
</div>
389375
<p class="source">

docs/boolean.html

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ <h1 class="class_name">Boolean</h1>
100100
<h2>Description</h2>
101101
<hr />
102102
<div><p>BooleanObject represents boolean object in goby.
103-
It includes <code>true</code> and <code>FALSE</code> which represents logically true and false value.</p>
103+
It includes <code>true</code> and <code>FALSE</code> which represents logically true and false value.</p>
104104
</div>
105105

106106
<h2>Instance Methods</h2>
@@ -134,11 +134,10 @@ <h4 class="method">
134134
<span class="prefix">#</span>
135135
<span class="title">!</span>
136136
</h4>
137-
<div class="method-comment"><p>Reverse the receiver.
138-
//</p>
137+
<div class="method-comment"><p>Reverse the receiver.</p>
139138

140-
<pre><code class="language-ruby">!true # =&gt; false
141-
!false # =&gt; true
139+
<pre><code class="language-ruby"> !true # =&gt; false
140+
!false # =&gt; true
142141
</code></pre>
143142
</div>
144143
<p class="source">
@@ -151,11 +150,10 @@ <h4 class="method">
151150
<span class="prefix">#</span>
152151
<span class="title">&amp;&amp;</span>
153152
</h4>
154-
<div class="method-comment"><p>Returns true if both the receiver and the argument are true.
155-
//</p>
153+
<div class="method-comment"><p>Returns true if both the receiver and the argument are true.</p>
156154

157-
<pre><code class="language-ruby">3 &gt; 2 &amp;&amp; 5 &gt; 3 # =&gt; true
158-
3 &gt; 2 &amp;&amp; 5 &gt; 10 # =&gt; false
155+
<pre><code class="language-ruby"> 3 &gt; 2 &amp;&amp; 5 &gt; 3 # =&gt; true
156+
3 &gt; 2 &amp;&amp; 5 &gt; 10 # =&gt; false
159157
</code></pre>
160158
</div>
161159
<p class="source">
@@ -168,12 +166,11 @@ <h4 class="method">
168166
<span class="prefix">#</span>
169167
<span class="title">||</span>
170168
</h4>
171-
<div class="method-comment"><p>Returns true either if the receiver or argument is true.
172-
//</p>
169+
<div class="method-comment"><p>Returns true either if the receiver or argument is true.</p>
173170

174-
<pre><code class="language-ruby">3 &gt; 2 || 5 &gt; 3 # =&gt; true
175-
3 &gt; 2 || 5 &gt; 10 # =&gt; true
176-
2 &gt; 3 || 5 &gt; 10 # =&gt; false
171+
<pre><code class="language-ruby"> 3 &gt; 2 || 5 &gt; 3 # =&gt; true
172+
3 &gt; 2 || 5 &gt; 10 # =&gt; true
173+
2 &gt; 3 || 5 &gt; 10 # =&gt; false
177174
</code></pre>
178175
</div>
179176
<p class="source">

docs/class.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ <h1 class="class_name">Class</h1>
100100
<h2>Description</h2>
101101
<hr />
102102
<div><p>Class is an interface that implements a class&rsquo;s basic functions.
103-
- lookupClassMethod: search for current class&rsquo;s class method with given name.
104-
- lookupInstanceMethod: search for current class&rsquo;s instance method with given name.
105-
- ReturnName returns class&rsquo;s name</p>
103+
- lookupClassMethod: search for current class&rsquo;s class method with given name.
104+
- lookupInstanceMethod: search for current class&rsquo;s instance method with given name.
105+
- ReturnName returns class&rsquo;s name</p>
106106
</div>
107107

108108
<h2>Instance Methods</h2>

docs/integer.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ <h1 class="class_name">Integer</h1>
9999

100100
<h2>Description</h2>
101101
<hr />
102-
<div><p>IntegerObject represents number objects which can bring into mathematical calculations.
103-
//</p>
102+
<div><p>IntegerObject represents number objects which can bring into mathematical calculations.</p>
104103

105-
<pre><code class="language-ruby">1 + 1 # =&gt; 2
106-
2 * 2 # =&gt; 4
104+
<pre><code class="language-ruby"> 1 + 1 # =&gt; 2
105+
2 * 2 # =&gt; 4
107106
</code></pre>
108107
</div>
109108

@@ -318,11 +317,10 @@ <h4 class="method">
318317
<span class="prefix">#</span>
319318
<span class="title">odd</span>
320319
</h4>
321-
<div class="method-comment"><p>Returns if self is odd.
322-
//</p>
320+
<div class="method-comment"><p>Returns if self is odd.</p>
323321

324-
<pre><code class="language-ruby">3.odd # =&gt; true
325-
4.odd # =&gt; false
322+
<pre><code class="language-ruby"> 3.odd # =&gt; true
323+
4.odd # =&gt; false
326324
</code></pre>
327325
</div>
328326
<p class="source">

0 commit comments

Comments
 (0)