File: example31.result

package info (click to toggle)
erubis 2.6.2-3.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,064 kB
  • ctags: 1,320
  • sloc: ruby: 6,193; makefile: 108; ansic: 97; php: 17
file content (22 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ ruby example3.rb 2> stderr.log
----- script source ---
_buf = ''; for item in list 
 _buf << '  <p>'; _buf << Erubis::XmlHelper.escape_xml( item ); _buf << '</p>
  <p>'; _buf << ( item ).to_s; _buf << '</p>
  <p>'; $stderr.puts("*** debug: item=#{(item).inspect}"); _buf << '</p>

'; end 
_buf.to_s
----- result ----------
  <p>&lt;aaa&gt;</p>
  <p><aaa></p>
  <p></p>

  <p>b&amp;b</p>
  <p>b&b</p>
  <p></p>

  <p>&quot;ccc&quot;</p>
  <p>"ccc"</p>
  <p></p>