Skip to content

Commit d907f37

Browse files
authored
Update execution result style in example code (#30)
1 parent 52a7579 commit d907f37

File tree

7 files changed

+69
-64
lines changed

7 files changed

+69
-64
lines changed

Diff for: draw.html

+13-13
Original file line numberDiff line numberDiff line change
@@ -816,14 +816,14 @@ <h4>Description</h4>
816816
<h4>Example</h4>
817817

818818
<pre class="language-ruby">
819-
draw.inspect &raquo;
820-
"stroke red
821-
fill transparent
822-
rectangle 20,20 380,180
823-
line 200,20 200,180
824-
line 20,100 380,100
825-
stroke transparent
826-
fill black"
819+
draw.inspect
820+
#=&gt; "stroke red
821+
# fill transparent
822+
# rectangle 20,20 380,180
823+
# line 200,20 200,180
824+
# line 20,100 380,100
825+
# stroke transparent
826+
# fill black"
827827
</pre
828828
>
829829
</div>
@@ -2700,12 +2700,12 @@ <h4>Returns</h4>
27002700

27012701
<h4>Quoting examples</h4>
27022702

2703-
<p>The text to the right of &raquo; is the text that will be drawn.</p>
2703+
<p>The text to the right of #=&gt; is the text that will be drawn.</p>
27042704
<pre class="language-ruby">
2705-
gc.text(10,10, '"Hello there!"') &raquo; Hello there!
2706-
gc.text(10,10, "'What\'s up?'") &raquo; What's up?
2707-
gc.text(10,10, %q/"What's up?"/) &raquo; What's up?
2708-
gc.text(10,10, %q/{"What's up?"}/) &raquo; "What's up?"
2705+
gc.text(10,10, '"Hello there!"') #=&gt; Hello there!
2706+
gc.text(10,10, "'What\'s up?'") #=&gt; What's up?
2707+
gc.text(10,10, %q/"What's up?"/) #=&gt; What's up?
2708+
gc.text(10,10, %q/{"What's up?"}/) #=&gt; "What's up?"
27092709
</pre
27102710
>
27112711

Diff for: ilist.html

+15-13
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ <h4>Example</h4>
248248

249249
<pre class="language-ruby">
250250
i = Magick::ImageList.new("images/Button_A.gif", "images/Button_B.gif")
251-
i.length &raquo; 2
251+
i.length #=&gt; 2
252252
</pre
253253
>
254254
</div>
@@ -271,7 +271,7 @@ <h4>Example</h4>
271271

272272
<pre class="language-ruby">
273273
ilist.scene = 10
274-
ilist.scene &raquo; 10
274+
ilist.scene #=&gt; 10
275275
</pre
276276
>
277277
</div>
@@ -1015,9 +1015,9 @@ <h4>Example</h4>
10151015

10161016
<pre class="language-ruby">
10171017
i = Magick::ImageList.new("images/Button_A.gif", "images/Button_B.gif")
1018-
&raquo; [images/Button_A.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 18136b
1019-
images/Button_B.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 5157b]
1020-
scene=1
1018+
#=&gt; [images/Button_A.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 18136b
1019+
# images/Button_B.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 5157b]
1020+
# scene=1
10211021
</pre
10221022
>
10231023

@@ -1533,8 +1533,8 @@ <h4>Example</h4>
15331533
<pre class="language-ruby">
15341534
ilist = Magick::ImageList.new
15351535
ilist.ping "Button_A.gif"
1536-
puts "The image has #{i.columns} columns and #{i.rows} rows." &raquo;
1537-
The image has 127 columns and 120 rows.
1536+
puts "The image has #{i.columns} columns and #{i.rows} rows."
1537+
#=&gt; The image has 127 columns and 120 rows.
15381538
</pre
15391539
>
15401540

@@ -1789,7 +1789,7 @@ <h4>Example</h4>
17891789

17901790
<pre class="language-ruby">
17911791
i = Magick::ImageList.new "birthday.png"
1792-
s = i.to_blob &raquo; a string representing the image.
1792+
s = i.to_blob #=&gt; a string representing the image.
17931793
</pre
17941794
>
17951795

@@ -1873,13 +1873,15 @@ <h4>Example</h4>
18731873
# The PNG format does not support multi-frame files,
18741874
# so each image is written to a separate file.
18751875
i = Magick::ImageList.new "animated.gif"
1876-
p i.length &raquo; 3 # contains 3 images
1877-
i.write "test.png" &raquo; test.png.0
1878-
&raquo; test.png.1
1879-
&raquo; test.png.2
1876+
p i.length #=&gt; 3 # contains 3 images
1877+
i.write "test.png"
1878+
#=&gt; test.png.0
1879+
# test.png.1
1880+
# test.png.2
1881+
18801882
# ImageMagick's MIFF format does support multi-frame
18811883
# files, so all 3 images are written to one file.
1882-
i.write "animated.miff" &raquo; animated.miff
1884+
i.write "animated.miff" #=&gt; animated.miff
18831885
</pre
18841886
>
18851887

Diff for: image1.html

+11-10
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ <h4>Returns</h4>
589589
<h4>Example</h4>
590590

591591
<pre class="language-ruby">
592-
cheetah = Magick::Image.ping("Cheetah.jpg") &raquo; [Cheetah.jpg JPEG 1024x768 DirectClass 8-bit 101684b]
593-
p cheetah[0].rows &raquo; 768
594-
p cheetah[0].columns &raquo; 1024
592+
cheetah = Magick::Image.ping("Cheetah.jpg") #=&gt; [Cheetah.jpg JPEG 1024x768 DirectClass 8-bit 101684b]
593+
p cheetah[0].rows #=&gt; 768
594+
p cheetah[0].columns #=&gt; 1024
595595
</pre
596596
>
597597

@@ -641,9 +641,10 @@ <h4>Returns</h4>
641641
<h4>Example</h4>
642642

643643
<pre class="language-ruby">
644-
animated = Magick::Image.read("animated.gif") &raquo; [animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
645-
&raquo; animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
646-
&raquo; animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
644+
animated = Magick::Image.read("animated.gif")
645+
#=&gt; [animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
646+
# animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
647+
# animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
647648
</pre
648649
>
649650

@@ -3379,10 +3380,10 @@ <h4>Returns</h4>
33793380
<h4>Example</h4>
33803381

33813382
<pre class="language-ruby">
3382-
f = Magick::Image.read('cbezier1.gif').first &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
3383-
f.colors &raquo; 128
3384-
f.compress_colormap! &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
3385-
f.colors &raquo; 108
3383+
f = Magick::Image.read('cbezier1.gif').first #=&gt; cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
3384+
f.colors #=&gt; 128
3385+
f.compress_colormap! #=&gt; cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
3386+
f.colors #=&gt; 108
33863387
</pre
33873388
>
33883389

Diff for: image2.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,9 @@ <h4>Returns</h4>
13521352
<h4>Example</h4>
13531353

13541354
<pre class="language-ruby">
1355-
image.get_exif_by_entry('Make') &raquo; [["Make", "Canon"]]
1356-
image.get_exif_by_entry("ShutterSpeedValue") &raquo; [["ShutterSpeedValue", "189/32"]]
1357-
image.get_exif_by_entry() &raquo; [["Make", "Canon"], ["ShutterSpeedValue", "189/32"] ...]
1355+
image.get_exif_by_entry('Make') #=&gt; [["Make", "Canon"]]
1356+
image.get_exif_by_entry("ShutterSpeedValue") #=&gt; [["ShutterSpeedValue", "189/32"]]
1357+
image.get_exif_by_entry() #=&gt; [["Make", "Canon"], ["ShutterSpeedValue", "189/32"] ...]
13581358
</pre
13591359
>
13601360

@@ -1391,9 +1391,9 @@ <h4>Returns</h4>
13911391
<h4>Example</h4>
13921392

13931393
<pre class="language-ruby">
1394-
image.get_exif_by_number(271) &raquo; {271=&gt;"Canon"}
1395-
image.get_exif_by_number(37377) &raquo; {37377=&gt;"189/32"}
1396-
image.get_exif_by_number() &raquo; {271=&gt;"Canon", 37377=&gt;"189/32" ...}
1394+
image.get_exif_by_number(271) #=&gt; {271=&gt;"Canon"}
1395+
image.get_exif_by_number(37377) #=&gt; {37377=&gt;"189/32"}
1396+
image.get_exif_by_number() #=&gt; {271=&gt;"Canon", 37377=&gt;"189/32" ...}
13971397
</pre
13981398
>
13991399

@@ -2296,7 +2296,7 @@ <h4>Description</h4>
22962296

22972297
<h4>Example</h4>
22982298

2299-
<pre class="language-ruby">f.inspect &raquo; "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"</pre>
2299+
<pre class="language-ruby">f.inspect #=&gt; "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"</pre>
23002300
</div>
23012301

23022302
<div class="sig">

Diff for: image3.html

+9-8
Original file line numberDiff line numberDiff line change
@@ -2514,11 +2514,12 @@ <h4>Returns</h4>
25142514

25152515
<h4>Example</h4>
25162516
<pre class="language-ruby">
2517-
img = Magick::Image.read('ex/images/Flower_Hat.jpg').first &raquo; ex/images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9761b
2518-
img.properties &raquo; {"comment"=&gt;"File written by Adobe Photoshop\250 4.0"}
2519-
img.signature &raquo; "485e01ecba1a1f47924d67b887cb07b474f695841733796dfa3c2876965c7e8b"
2520-
img.properties &raquo; {"signature"=&gt;"485e01ecba1a1f47924d67b887cb07b474f695841733796dfa3c2876965c7e8b",
2521-
&raquo; "comment"=&gt;"File written by Adobe Photoshop\250 4.0"}
2517+
img = Magick::Image.read('ex/images/Flower_Hat.jpg').first #=&gt; ex/images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9761b
2518+
img.properties #=&gt; {"comment"=&gt;"File written by Adobe Photoshop\250 4.0"}
2519+
img.signature #=&gt; "485e01ecba1a1f47924d67b887cb07b474f695841733796dfa3c2876965c7e8b"
2520+
img.properties
2521+
#=&gt; {"signature"=&gt;"485e01ecba1a1f47924d67b887cb07b474f695841733796dfa3c2876965c7e8b",
2522+
# "comment"=&gt;"File written by Adobe Photoshop\250 4.0"}
25222523
</pre
25232524
>
25242525

@@ -3381,9 +3382,9 @@ <h4>Returns</h4>
33813382

33823383
<h4>Example</h4>
33833384
<pre class="language-ruby">
3384-
img = Magick::Image.read('ex/images/Flower_Hat.jpg').first &raquo; ex/images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9761b
3385-
pixel = img.pixel_color(img.columns/2, img.rows/2) &raquo; #&lt;struct Pixel red=216, green=147, blue=106, opacity=0&gt;
3386-
img.to_color(pixel) &raquo; "#D8936A"
3385+
img = Magick::Image.read('ex/images/Flower_Hat.jpg').first #=&gt; ex/images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9761b
3386+
pixel = img.pixel_color(img.columns/2, img.rows/2) #=&gt; #&lt;struct Pixel red=216, green=147, blue=106, opacity=0&gt;
3387+
img.to_color(pixel) #=&gt; "#D8936A"
33873388
</pre
33883389
>
33893390

Diff for: info.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ <h4 id="user_option">The "user" option</h4>
255255
<pre class="language-ruby">
256256
img = Magick::Image.new(10,10) do |options|
257257
options['user'] = __FILE__ + ':' + __LINE__.to_s
258-
end &raquo; 10x10 DirectClass 16-bit user:test.rb:3
258+
end
259+
#=&gt; 10x10 DirectClass 16-bit user:test.rb:3
259260
</pre
260261
>
261262

@@ -313,7 +314,7 @@ <h4>Returns</h4>
313314

314315
<h4>Example</h4>
315316

316-
<pre class="language-ruby">options["tiff", "bits-per-sample"] &raquo; 2</pre>
317+
<pre class="language-ruby">options["tiff", "bits-per-sample"] #=&gt; 2</pre>
317318

318319
<h4>Magick API</h4>
319320

@@ -520,8 +521,8 @@ <h4>Description</h4>
520521
options.caption = "a new caption"
521522
options.size = "20x20"
522523
end
523-
p img.first.properties &raquo; {"caption"=&gt;"a new caption"}
524-
p img.first['caption'] &raquo; "a new caption"
524+
p img.first.properties #=&gt; {"caption"=&gt;"a new caption"}
525+
p img.first['caption'] #=&gt; "a new caption"
525526
</pre
526527
>
527528

Diff for: magick.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,15 @@ <h4>Returns</h4>
284284
<h4>Example</h4>
285285

286286
<pre class="language-ruby">
287-
p Magick.formats &raquo;
288-
{"TIF"=&gt;"*rw+",
289-
"H"=&gt;"*rw-",
290-
"MNG"=&gt;"*rw+",
291-
"NULL"=&gt;"*rw-",
292-
...
293-
"G"=&gt;"*rw+",
294-
"GIF"=&gt;"*rw+",
295-
"PDB"=&gt;"*rw+"}
287+
p Magick.formats
288+
#=&gt; {"TIF"=&gt;"*rw+",
289+
# "H"=&gt;"*rw-",
290+
# "MNG"=&gt;"*rw+",
291+
# "NULL"=&gt;"*rw-",
292+
# ...
293+
# "G"=&gt;"*rw+",
294+
# "GIF"=&gt;"*rw+",
295+
# "PDB"=&gt;"*rw+"}
296296
</pre
297297
>
298298

0 commit comments

Comments
 (0)