roxml 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. data/doc/classes/ROXML.html +374 -0
  2. data/doc/classes/ROXML.src/M000003.html +19 -0
  3. data/doc/classes/ROXML.src/M000004.html +25 -0
  4. data/doc/classes/ROXML.src/M000005.html +22 -0
  5. data/doc/classes/ROXML/ROXML_Class.html +429 -0
  6. data/doc/classes/ROXML/ROXML_Class.src/M000006.html +27 -0
  7. data/doc/classes/ROXML/ROXML_Class.src/M000007.html +18 -0
  8. data/doc/classes/ROXML/ROXML_Class.src/M000008.html +19 -0
  9. data/doc/classes/ROXML/ROXML_Class.src/M000009.html +25 -0
  10. data/doc/classes/ROXML/ROXML_Class.src/M000010.html +24 -0
  11. data/doc/classes/ROXML/ROXML_Class.src/M000011.html +18 -0
  12. data/doc/classes/ROXML/ROXML_Class.src/M000012.html +18 -0
  13. data/doc/classes/ROXML/XMLAttributeRef.html +175 -0
  14. data/doc/classes/ROXML/XMLAttributeRef.src/M000015.html +19 -0
  15. data/doc/classes/ROXML/XMLAttributeRef.src/M000016.html +19 -0
  16. data/doc/classes/ROXML/XMLObjectRef.html +175 -0
  17. data/doc/classes/ROXML/XMLObjectRef.src/M000013.html +26 -0
  18. data/doc/classes/ROXML/XMLObjectRef.src/M000014.html +32 -0
  19. data/doc/classes/ROXML/XMLRef.html +166 -0
  20. data/doc/classes/ROXML/XMLRef.src/M000017.html +21 -0
  21. data/doc/classes/ROXML/XMLTextRef.html +198 -0
  22. data/doc/classes/ROXML/XMLTextRef.src/M000018.html +28 -0
  23. data/doc/classes/ROXML/XMLTextRef.src/M000019.html +34 -0
  24. data/doc/classes/String.html +165 -0
  25. data/doc/classes/String.src/M000001.html +23 -0
  26. data/doc/classes/String.src/M000002.html +23 -0
  27. data/doc/created.rid +1 -0
  28. data/doc/files/lib/roxml_rb.html +234 -0
  29. data/doc/fr_class_index.html +33 -0
  30. data/doc/fr_file_index.html +27 -0
  31. data/doc/fr_method_index.html +45 -0
  32. data/doc/index.html +24 -0
  33. data/doc/rdoc-style.css +208 -0
  34. data/lib/roxml.rb +1 -1
  35. data/test/fixtures/person.xml +1 -0
  36. data/test/mocks/mocks.rb +4 -0
  37. data/test/test_roxml.rb +9 -1
  38. metadata +54 -12
@@ -0,0 +1,27 @@
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>
7
+ <head>
8
+ <title>parse (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 248</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">data</span>)
15
+
16
+ <span class="ruby-identifier">xml</span> = (<span class="ruby-identifier">data</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Element</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">data</span> <span class="ruby-operator">:</span> <span class="ruby-constant">REXML</span><span class="ruby-operator">::</span><span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">data</span>).<span class="ruby-identifier">root</span>)
17
+
18
+ <span class="ruby-identifier">inst</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">allocate</span>
19
+
20
+ <span class="ruby-identifier">tag_refs</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ref</span><span class="ruby-operator">|</span>
21
+ <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">populate</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">inst</span>)
22
+ <span class="ruby-keyword kw">end</span>
23
+
24
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">inst</span>
25
+ <span class="ruby-keyword kw">end</span></pre>
26
+ </body>
27
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>xml_name (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 271</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_name</span>(<span class="ruby-identifier">name</span>)
15
+ <span class="ruby-ivar">@tag_name</span> = <span class="ruby-identifier">name</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,19 @@
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>
7
+ <head>
8
+ <title>xml_attribute (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 292</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_attribute</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span> = <span class="ruby-value">0</span>)
15
+ <span class="ruby-identifier">add_ref</span>(<span class="ruby-constant">XMLAttributeRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span>))
16
+ <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>))
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,25 @@
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>
7
+ <head>
8
+ <title>xml_text (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 323</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_text</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span> = <span class="ruby-constant">TAG_DEFAULT</span>, <span class="ruby-identifier">wrapper</span> = <span class="ruby-keyword kw">nil</span>)
15
+ <span class="ruby-identifier">ref</span> = <span class="ruby-constant">XMLTextRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">text_content</span> = (<span class="ruby-constant">TEXT_CONTENT</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TEXT_CONTENT</span>)
17
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">cdata</span> = (<span class="ruby-constant">TAG_CDATA</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TAG_CDATA</span>)
18
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">array</span> = (<span class="ruby-constant">TAG_ARRAY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span><span class="ruby-operator">==</span><span class="ruby-constant">TAG_ARRAY</span>)
19
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">wrapper</span> = <span class="ruby-identifier">wrapper</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">wrapper</span>
20
+ <span class="ruby-keyword kw">end</span>
21
+ <span class="ruby-identifier">add_ref</span>(<span class="ruby-identifier">ref</span>)
22
+ <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>), <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">array</span>)
23
+ <span class="ruby-keyword kw">end</span></pre>
24
+ </body>
25
+ </html>
@@ -0,0 +1,24 @@
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>
7
+ <head>
8
+ <title>xml_object (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 382</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml_object</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-identifier">klass</span>, <span class="ruby-identifier">options</span> = <span class="ruby-value">0</span>, <span class="ruby-identifier">wrapper</span> = <span class="ruby-keyword kw">nil</span>)
15
+ <span class="ruby-identifier">ref</span> = <span class="ruby-constant">XMLObjectRef</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">sym</span>, <span class="ruby-keyword kw">nil</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">r</span><span class="ruby-operator">|</span>
16
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">array</span> = (<span class="ruby-constant">TAG_ARRAY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">==</span> <span class="ruby-constant">TAG_ARRAY</span>)
17
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">wrapper</span> = <span class="ruby-identifier">wrapper</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">wrapper</span>
18
+ <span class="ruby-identifier">r</span>.<span class="ruby-identifier">klass</span> = <span class="ruby-identifier">klass</span>
19
+ <span class="ruby-keyword kw">end</span>
20
+ <span class="ruby-identifier">add_ref</span>(<span class="ruby-identifier">ref</span>)
21
+ <span class="ruby-identifier">add_accessor</span>(<span class="ruby-identifier">sym</span>, (<span class="ruby-constant">TAG_READONLY</span> <span class="ruby-operator">&amp;</span> <span class="ruby-identifier">options</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">TAG_READONLY</span>), <span class="ruby-identifier">ref</span>.<span class="ruby-identifier">array</span>)
22
+ <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>tag_name (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 395</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_name</span>
15
+ <span class="ruby-ivar">@tag_name</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'::'</span>).<span class="ruby-identifier">last</span>.<span class="ruby-identifier">downcase</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
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>
7
+ <head>
8
+ <title>tag_refs (ROXML::ROXML_Class)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 401</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">tag_refs</span>
15
+ <span class="ruby-ivar">@xml_refs</span> <span class="ruby-operator">||</span> []
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,175 @@
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: ROXML::XMLAttributeRef</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">ROXML::XMLAttributeRef</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/roxml_rb.html">
59
+ lib/roxml.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
+ <a href="XMLRef.html">
69
+ XMLRef
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+ <div id="description">
84
+ <p>
85
+ Interal class representing an XML attribute binding
86
+ </p>
87
+ <p>
88
+ In context:
89
+ </p>
90
+ <pre>
91
+ &lt;element attribute=&quot;XMLAttributeRef&quot;&gt;
92
+ XMLTextRef
93
+ &lt;/element&gt;
94
+ </pre>
95
+
96
+ </div>
97
+
98
+
99
+ </div>
100
+
101
+ <div id="method-list">
102
+ <h3 class="section-bar">Methods</h3>
103
+
104
+ <div class="name-list">
105
+ <a href="#M000016">populate</a>&nbsp;&nbsp;
106
+ <a href="#M000015">update_xml</a>&nbsp;&nbsp;
107
+ </div>
108
+ </div>
109
+
110
+ </div>
111
+
112
+
113
+ <!-- if includes -->
114
+
115
+ <div id="section">
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+ <!-- if method_list -->
125
+ <div id="methods">
126
+ <h3 class="section-bar">Public Instance methods</h3>
127
+
128
+ <div id="method-M000016" class="method-detail">
129
+ <a name="M000016"></a>
130
+
131
+ <div class="method-heading">
132
+ <a href="XMLAttributeRef.src/M000016.html" target="Code" class="method-signature"
133
+ onclick="popupCode('XMLAttributeRef.src/M000016.html');return false;">
134
+ <span class="method-name">populate</span><span class="method-args">(xml, instance)</span>
135
+ </a>
136
+ </div>
137
+
138
+ <div class="method-description">
139
+ <p>
140
+ Reads data from the XML element and populates the object instance
141
+ accordingly.
142
+ </p>
143
+ </div>
144
+ </div>
145
+
146
+ <div id="method-M000015" class="method-detail">
147
+ <a name="M000015"></a>
148
+
149
+ <div class="method-heading">
150
+ <a href="XMLAttributeRef.src/M000015.html" target="Code" class="method-signature"
151
+ onclick="popupCode('XMLAttributeRef.src/M000015.html');return false;">
152
+ <span class="method-name">update_xml</span><span class="method-args">(xml, value)</span>
153
+ </a>
154
+ </div>
155
+
156
+ <div class="method-description">
157
+ <p>
158
+ Updates the attribute in the given XML block to the value provided.
159
+ </p>
160
+ </div>
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+
167
+ </div>
168
+
169
+
170
+ <div id="validator-badges">
171
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172
+ </div>
173
+
174
+ </body>
175
+ </html>
@@ -0,0 +1,19 @@
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>
7
+ <head>
8
+ <title>update_xml (ROXML::XMLAttributeRef)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 129</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update_xml</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">value</span>)
15
+ <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">value</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">to_utf</span>
16
+ <span class="ruby-identifier">xml</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,19 @@
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>
7
+ <head>
8
+ <title>populate (ROXML::XMLAttributeRef)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/roxml.rb, line 136</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">populate</span>(<span class="ruby-identifier">xml</span>, <span class="ruby-identifier">instance</span>)
15
+ <span class="ruby-identifier">instance</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">&quot;@#{accessor}&quot;</span>, <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-identifier">name</span>])
16
+ <span class="ruby-identifier">instance</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,175 @@
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: ROXML::XMLObjectRef</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">ROXML::XMLObjectRef</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/roxml_rb.html">
59
+ lib/roxml.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
+ <a href="XMLTextRef.html">
69
+ XMLTextRef
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000014">populate</a>&nbsp;&nbsp;
92
+ <a href="#M000013">update_xml</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+ <div id="attribute-list">
108
+ <h3 class="section-bar">Attributes</h3>
109
+
110
+ <div class="name-list">
111
+ <table>
112
+ <tr class="top-aligned-row context-row">
113
+ <td class="context-item-name">klass</td>
114
+ <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
115
+ <td class="context-item-desc"></td>
116
+ </tr>
117
+ </table>
118
+ </div>
119
+ </div>
120
+
121
+
122
+
123
+ <!-- if method_list -->
124
+ <div id="methods">
125
+ <h3 class="section-bar">Public Instance methods</h3>
126
+
127
+ <div id="method-M000014" class="method-detail">
128
+ <a name="M000014"></a>
129
+
130
+ <div class="method-heading">
131
+ <a href="XMLObjectRef.src/M000014.html" target="Code" class="method-signature"
132
+ onclick="popupCode('XMLObjectRef.src/M000014.html');return false;">
133
+ <span class="method-name">populate</span><span class="method-args">(xml, instance)</span>
134
+ </a>
135
+ </div>
136
+
137
+ <div class="method-description">
138
+ <p>
139
+ Reads data from the XML element and populates the references XML object
140
+ accordingly.
141
+ </p>
142
+ </div>
143
+ </div>
144
+
145
+ <div id="method-M000013" class="method-detail">
146
+ <a name="M000013"></a>
147
+
148
+ <div class="method-heading">
149
+ <a href="XMLObjectRef.src/M000013.html" target="Code" class="method-signature"
150
+ onclick="popupCode('XMLObjectRef.src/M000013.html');return false;">
151
+ <span class="method-name">update_xml</span><span class="method-args">(xml, value)</span>
152
+ </a>
153
+ </div>
154
+
155
+ <div class="method-description">
156
+ <p>
157
+ Updates the composed XML object in the given XML block to the value
158
+ provided.
159
+ </p>
160
+ </div>
161
+ </div>
162
+
163
+
164
+ </div>
165
+
166
+
167
+ </div>
168
+
169
+
170
+ <div id="validator-badges">
171
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
172
+ </div>
173
+
174
+ </body>
175
+ </html>