eymiha_url 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/gem_package.rb +1 -1
- data/html/classes/Eymiha.html +121 -0
- data/html/classes/Eymiha/UrlException.html +117 -0
- data/html/classes/Eymiha/UrlNormalizer.html +358 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000001.html +20 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000002.html +22 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000003.html +18 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000004.html +18 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000005.html +19 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000006.html +21 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000007.html +18 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000008.html +22 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000009.html +20 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000010.html +19 -0
- data/html/classes/Eymiha/UrlNormalizer.src/M000011.html +24 -0
- data/html/classes/Eymiha/UrlOpener.html +353 -0
- data/html/classes/Eymiha/UrlOpener.src/M000012.html +18 -0
- data/html/classes/Eymiha/UrlOpener.src/M000013.html +18 -0
- data/html/classes/Eymiha/UrlOpener.src/M000014.html +22 -0
- data/html/classes/Eymiha/UrlOpener.src/M000015.html +18 -0
- data/html/classes/Eymiha/UrlOpener.src/M000016.html +18 -0
- data/html/classes/Eymiha/UrlOpener.src/M000017.html +18 -0
- data/html/classes/Eymiha/UrlOpener.src/M000018.html +23 -0
- data/html/classes/Eymiha/UrlOpener.src/M000019.html +22 -0
- data/html/classes/Eymiha/UrlOpener.src/M000020.html +26 -0
- data/html/classes/Eymiha/UrlOpener.src/M000021.html +18 -0
- data/html/created.rid +1 -0
- data/html/files/lib/eymiha/url/url_exception_rb.html +101 -0
- data/html/files/lib/eymiha/url/url_normalizer_rb.html +109 -0
- data/html/files/lib/eymiha/url/url_opener_rb.html +110 -0
- data/html/files/lib/eymiha/url_rb.html +116 -0
- data/html/files/lib/eymiha_url_rb.html +114 -0
- data/html/fr_class_index.html +30 -0
- data/html/fr_file_index.html +31 -0
- data/html/fr_method_index.html +47 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/eymiha/url/url_normalizer.rb +9 -2
- data/lib/eymiha/url/url_opener.rb +2 -2
- data/test/tc_url_normalizer.rb +1 -1
- metadata +46 -2
data/gem_package.rb
CHANGED
@@ -0,0 +1,121 @@
|
|
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>Module: Eymiha</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>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Eymiha</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/eymiha/url/url_exception_rb.html">
|
59
|
+
lib/eymiha/url/url_exception.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/eymiha/url/url_normalizer_rb.html">
|
63
|
+
lib/eymiha/url/url_normalizer.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/eymiha/url/url_opener_rb.html">
|
67
|
+
lib/eymiha/url/url_opener.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
|
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
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
<!-- if includes -->
|
92
|
+
|
93
|
+
<div id="section">
|
94
|
+
|
95
|
+
<div id="class-list">
|
96
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
97
|
+
|
98
|
+
Class <a href="Eymiha/UrlException.html" class="link">Eymiha::UrlException</a><br />
|
99
|
+
Class <a href="Eymiha/UrlNormalizer.html" class="link">Eymiha::UrlNormalizer</a><br />
|
100
|
+
Class <a href="Eymiha/UrlOpener.html" class="link">Eymiha::UrlOpener</a><br />
|
101
|
+
|
102
|
+
</div>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<!-- if method_list -->
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
|
115
|
+
|
116
|
+
<div id="validator-badges">
|
117
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
118
|
+
</div>
|
119
|
+
|
120
|
+
</body>
|
121
|
+
</html>
|
@@ -0,0 +1,117 @@
|
|
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: Eymiha::UrlException</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">Eymiha::UrlException</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/eymiha/url/url_exception_rb.html">
|
59
|
+
lib/eymiha/url/url_exception.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
|
+
Exception
|
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
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Raised when a problem has occured when normalizing or opening a URL.
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
|
94
|
+
|
95
|
+
<!-- if includes -->
|
96
|
+
|
97
|
+
<div id="section">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if method_list -->
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
|
111
|
+
|
112
|
+
<div id="validator-badges">
|
113
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
</body>
|
117
|
+
</html>
|
@@ -0,0 +1,358 @@
|
|
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: Eymiha::UrlNormalizer</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">Eymiha::UrlNormalizer</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/eymiha/url/url_normalizer_rb.html">
|
59
|
+
lib/eymiha/url/url_normalizer.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
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
A <a href="UrlNormalizer.html">UrlNormalizer</a> normalizes URLs. They are
|
84
|
+
validated using the URI class except when they can be identified as file
|
85
|
+
resources. When so, if the designated file‘s name starts with a slash
|
86
|
+
(or a drive identifier followed by a slash on a windows box) the path is
|
87
|
+
used verbatim. If not, the named file is assumed to be relative to a
|
88
|
+
caller-supplied base directory.
|
89
|
+
</p>
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
|
96
|
+
<div id="method-list">
|
97
|
+
<h3 class="section-bar">Methods</h3>
|
98
|
+
|
99
|
+
<div class="name-list">
|
100
|
+
<a href="#M000010">absolute_file_path</a>
|
101
|
+
<a href="#M000009">absolute_file_path?</a>
|
102
|
+
<a href="#M000006">file_url?</a>
|
103
|
+
<a href="#M000004">new</a>
|
104
|
+
<a href="#M000005">normalize</a>
|
105
|
+
<a href="#M000007">normalize_file</a>
|
106
|
+
<a href="#M000011">normalize_file_path</a>
|
107
|
+
<a href="#M000003">relative_base</a>
|
108
|
+
<a href="#M000008">relative_base=</a>
|
109
|
+
<a href="#M000002">relative_base=</a>
|
110
|
+
<a href="#M000001">valid_relative_base?</a>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
<!-- if includes -->
|
118
|
+
|
119
|
+
<div id="section">
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<div id="attribute-list">
|
126
|
+
<h3 class="section-bar">Attributes</h3>
|
127
|
+
|
128
|
+
<div class="name-list">
|
129
|
+
<table>
|
130
|
+
<tr class="top-aligned-row context-row">
|
131
|
+
<td class="context-item-name">relative_base</td>
|
132
|
+
<td class="context-item-value"> [R] </td>
|
133
|
+
<td class="context-item-desc"></td>
|
134
|
+
</tr>
|
135
|
+
</table>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
<!-- if method_list -->
|
142
|
+
<div id="methods">
|
143
|
+
<h3 class="section-bar">Public Class methods</h3>
|
144
|
+
|
145
|
+
<div id="method-M000010" class="method-detail">
|
146
|
+
<a name="M000010"></a>
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<a href="UrlNormalizer.src/M000010.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('UrlNormalizer.src/M000010.html');return false;">
|
151
|
+
<span class="method-name">absolute_file_path</span><span class="method-args">(file_url)</span>
|
152
|
+
</a>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
<div class="method-description">
|
156
|
+
<p>
|
157
|
+
grafts on the drive designator for an absolute file if not present and on a
|
158
|
+
pc filesystem
|
159
|
+
</p>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
|
163
|
+
<div id="method-M000009" class="method-detail">
|
164
|
+
<a name="M000009"></a>
|
165
|
+
|
166
|
+
<div class="method-heading">
|
167
|
+
<a href="UrlNormalizer.src/M000009.html" target="Code" class="method-signature"
|
168
|
+
onclick="popupCode('UrlNormalizer.src/M000009.html');return false;">
|
169
|
+
<span class="method-name">absolute_file_path?</span><span class="method-args">(file_url)</span>
|
170
|
+
</a>
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<div class="method-description">
|
174
|
+
<p>
|
175
|
+
Returns true if the given URL file resource is absolute.
|
176
|
+
</p>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div id="method-M000006" class="method-detail">
|
181
|
+
<a name="M000006"></a>
|
182
|
+
|
183
|
+
<div class="method-heading">
|
184
|
+
<a href="UrlNormalizer.src/M000006.html" target="Code" class="method-signature"
|
185
|
+
onclick="popupCode('UrlNormalizer.src/M000006.html');return false;">
|
186
|
+
<span class="method-name">file_url?</span><span class="method-args">(url)</span>
|
187
|
+
</a>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
<div class="method-description">
|
191
|
+
<p>
|
192
|
+
Returns true if the given URL is a file resource.
|
193
|
+
</p>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div id="method-M000004" class="method-detail">
|
198
|
+
<a name="M000004"></a>
|
199
|
+
|
200
|
+
<div class="method-heading">
|
201
|
+
<a href="UrlNormalizer.src/M000004.html" target="Code" class="method-signature"
|
202
|
+
onclick="popupCode('UrlNormalizer.src/M000004.html');return false;">
|
203
|
+
<span class="method-name">new</span><span class="method-args">()</span>
|
204
|
+
</a>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
<p>
|
209
|
+
Creates a <a href="UrlNormalizer.html#M000004">new</a> instance using the
|
210
|
+
default direcory for normalizing relative file resources.
|
211
|
+
</p>
|
212
|
+
</div>
|
213
|
+
</div>
|
214
|
+
|
215
|
+
<div id="method-M000003" class="method-detail">
|
216
|
+
<a name="M000003"></a>
|
217
|
+
|
218
|
+
<div class="method-heading">
|
219
|
+
<a href="UrlNormalizer.src/M000003.html" target="Code" class="method-signature"
|
220
|
+
onclick="popupCode('UrlNormalizer.src/M000003.html');return false;">
|
221
|
+
<span class="method-name">relative_base</span><span class="method-args">()</span>
|
222
|
+
</a>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
<div class="method-description">
|
226
|
+
<p>
|
227
|
+
Returns the default directory for normalizing relative file resources.
|
228
|
+
</p>
|
229
|
+
</div>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
<div id="method-M000002" class="method-detail">
|
233
|
+
<a name="M000002"></a>
|
234
|
+
|
235
|
+
<div class="method-heading">
|
236
|
+
<a href="UrlNormalizer.src/M000002.html" target="Code" class="method-signature"
|
237
|
+
onclick="popupCode('UrlNormalizer.src/M000002.html');return false;">
|
238
|
+
<span class="method-name">relative_base=</span><span class="method-args">(relative_base)</span>
|
239
|
+
</a>
|
240
|
+
</div>
|
241
|
+
|
242
|
+
<div class="method-description">
|
243
|
+
<p>
|
244
|
+
Sets and returns the default directory for normalizing relative file
|
245
|
+
resources. The directory is validated prior to assignment - if invalid a <a
|
246
|
+
href="UrlException.html">UrlException</a> will be raised.
|
247
|
+
</p>
|
248
|
+
</div>
|
249
|
+
</div>
|
250
|
+
|
251
|
+
<div id="method-M000001" class="method-detail">
|
252
|
+
<a name="M000001"></a>
|
253
|
+
|
254
|
+
<div class="method-heading">
|
255
|
+
<a href="UrlNormalizer.src/M000001.html" target="Code" class="method-signature"
|
256
|
+
onclick="popupCode('UrlNormalizer.src/M000001.html');return false;">
|
257
|
+
<span class="method-name">valid_relative_base?</span><span class="method-args">(relative_base)</span>
|
258
|
+
</a>
|
259
|
+
</div>
|
260
|
+
|
261
|
+
<div class="method-description">
|
262
|
+
<p>
|
263
|
+
Returns true if the given <a
|
264
|
+
href="UrlNormalizer.html#M000003">relative_base</a> is valid. It should
|
265
|
+
start and end with a slash (or start with a drive designator and a slash
|
266
|
+
and end with a slash on a PC).
|
267
|
+
</p>
|
268
|
+
</div>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
272
|
+
|
273
|
+
<div id="method-M000005" class="method-detail">
|
274
|
+
<a name="M000005"></a>
|
275
|
+
|
276
|
+
<div class="method-heading">
|
277
|
+
<a href="UrlNormalizer.src/M000005.html" target="Code" class="method-signature"
|
278
|
+
onclick="popupCode('UrlNormalizer.src/M000005.html');return false;">
|
279
|
+
<span class="method-name">normalize</span><span class="method-args">(url,relative_base=nil)</span>
|
280
|
+
</a>
|
281
|
+
</div>
|
282
|
+
|
283
|
+
<div class="method-description">
|
284
|
+
<p>
|
285
|
+
Returns a normalized URL relative to the given base if it is a relative
|
286
|
+
file resource.
|
287
|
+
</p>
|
288
|
+
</div>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div id="method-M000007" class="method-detail">
|
292
|
+
<a name="M000007"></a>
|
293
|
+
|
294
|
+
<div class="method-heading">
|
295
|
+
<a href="UrlNormalizer.src/M000007.html" target="Code" class="method-signature"
|
296
|
+
onclick="popupCode('UrlNormalizer.src/M000007.html');return false;">
|
297
|
+
<span class="method-name">normalize_file</span><span class="method-args">(file_url)</span>
|
298
|
+
</a>
|
299
|
+
</div>
|
300
|
+
|
301
|
+
<div class="method-description">
|
302
|
+
<p>
|
303
|
+
Normalizes and returns a relative or absolute URL file resource.
|
304
|
+
</p>
|
305
|
+
</div>
|
306
|
+
</div>
|
307
|
+
|
308
|
+
<div id="method-M000011" class="method-detail">
|
309
|
+
<a name="M000011"></a>
|
310
|
+
|
311
|
+
<div class="method-heading">
|
312
|
+
<a href="UrlNormalizer.src/M000011.html" target="Code" class="method-signature"
|
313
|
+
onclick="popupCode('UrlNormalizer.src/M000011.html');return false;">
|
314
|
+
<span class="method-name">normalize_file_path</span><span class="method-args">(file_url)</span>
|
315
|
+
</a>
|
316
|
+
</div>
|
317
|
+
|
318
|
+
<div class="method-description">
|
319
|
+
<p>
|
320
|
+
Returns an absolute path for the given URL file resource. This is either
|
321
|
+
the incoming URL if absolute, or the URL anchored at the relative base if
|
322
|
+
relative.
|
323
|
+
</p>
|
324
|
+
</div>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
<div id="method-M000008" class="method-detail">
|
328
|
+
<a name="M000008"></a>
|
329
|
+
|
330
|
+
<div class="method-heading">
|
331
|
+
<a href="UrlNormalizer.src/M000008.html" target="Code" class="method-signature"
|
332
|
+
onclick="popupCode('UrlNormalizer.src/M000008.html');return false;">
|
333
|
+
<span class="method-name">relative_base=</span><span class="method-args">(relative_base)</span>
|
334
|
+
</a>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div class="method-description">
|
338
|
+
<p>
|
339
|
+
Sets and Returns the directory for normalizing relative file resources. The
|
340
|
+
directory is validated prior to assignment - if invalid a <a
|
341
|
+
href="UrlException.html">UrlException</a> will be raised.
|
342
|
+
</p>
|
343
|
+
</div>
|
344
|
+
</div>
|
345
|
+
|
346
|
+
|
347
|
+
</div>
|
348
|
+
|
349
|
+
|
350
|
+
</div>
|
351
|
+
|
352
|
+
|
353
|
+
<div id="validator-badges">
|
354
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
</body>
|
358
|
+
</html>
|