| 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: CommandOptionError</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">CommandOptionError</td> |
| 54 |
</tr> |
| 55 |
<tr class="top-aligned-row"> |
| 56 |
<td><strong>In:</strong></td> |
| 57 |
<td> |
| 58 |
<a href="../files/kwalify/util/option-parser_rb.html"> |
| 59 |
kwalify/util/option-parser.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 |
StandardError |
| 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 |
$Rev$ $Release: 0.7.2 $ copyright(c) 2005-2010 kuwata-lab all rights reserved. |
| 84 |
</p> |
| 85 |
|
| 86 |
</div> |
| 87 |
|
| 88 |
|
| 89 |
</div> |
| 90 |
|
| 91 |
<div id="method-list"> |
| 92 |
<h3 class="section-bar">Methods</h3> |
| 93 |
|
| 94 |
<div class="name-list"> |
| 95 |
<a href="#M000004">new</a> |
| 96 |
</div> |
| 97 |
</div> |
| 98 |
|
| 99 |
</div> |
| 100 |
|
| 101 |
|
| 102 |
<!-- if includes --> |
| 103 |
|
| 104 |
<div id="section"> |
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
<div id="attribute-list"> |
| 111 |
<h3 class="section-bar">Attributes</h3> |
| 112 |
|
| 113 |
<div class="name-list"> |
| 114 |
<table> |
| 115 |
<tr class="top-aligned-row context-row"> |
| 116 |
<td class="context-item-name">error_symbol</td> |
| 117 |
<td class="context-item-value"> [R] </td> |
| 118 |
<td class="context-item-desc"></td> |
| 119 |
</tr> |
| 120 |
<tr class="top-aligned-row context-row"> |
| 121 |
<td class="context-item-name">option</td> |
| 122 |
<td class="context-item-value"> [R] </td> |
| 123 |
<td class="context-item-desc"></td> |
| 124 |
</tr> |
| 125 |
</table> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
<!-- if method_list --> |
| 132 |
<div id="methods"> |
| 133 |
<h3 class="section-bar">Public Class methods</h3> |
| 134 |
|
| 135 |
<div id="method-M000004" class="method-detail"> |
| 136 |
<a name="M000004"></a> |
| 137 |
|
| 138 |
<div class="method-heading"> |
| 139 |
<a href="#M000004" class="method-signature"> |
| 140 |
<span class="method-name">new</span><span class="method-args">(option, error_symbol, message=nil)</span> |
| 141 |
</a> |
| 142 |
</div> |
| 143 |
|
| 144 |
<div class="method-description"> |
| 145 |
<p><a class="source-toggle" href="#" |
| 146 |
onclick="toggleCode('M000004-source');return false;">[Source]</a></p> |
| 147 |
<div class="method-source-code" id="M000004-source"> |
| 148 |
<pre> |
| 149 |
<span class="ruby-comment cmt"># File kwalify/util/option-parser.rb, line 8</span> |
| 150 |
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">option</span>, <span class="ruby-identifier">error_symbol</span>, <span class="ruby-identifier">message</span>=<span class="ruby-keyword kw">nil</span>) |
| 151 |
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">message</span> |
| 152 |
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">error_symbol</span> |
| 153 |
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:no_argument</span> |
| 154 |
<span class="ruby-identifier">message</span> = <span class="ruby-value str">"-%s: argument required."</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">option</span> |
| 155 |
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:unknown_option</span> |
| 156 |
<span class="ruby-identifier">message</span> = <span class="ruby-value str">"-%s: unknown option."</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">option</span> |
| 157 |
<span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:invalid_property</span> |
| 158 |
<span class="ruby-identifier">message</span> = <span class="ruby-value str">"-%s: invalid property."</span> <span class="ruby-operator">%</span> <span class="ruby-identifier">option</span> |
| 159 |
<span class="ruby-keyword kw">else</span> |
| 160 |
<span class="ruby-identifier">message</span> = <span class="ruby-node">"*** internal error(optchar=#{option}, error_symbol=#{error_symbol}) ***"</span> |
| 161 |
<span class="ruby-keyword kw">end</span> |
| 162 |
<span class="ruby-keyword kw">end</span> |
| 163 |
<span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>) |
| 164 |
<span class="ruby-ivar">@option</span> = <span class="ruby-identifier">option</span> |
| 165 |
<span class="ruby-ivar">@error_symbol</span> = <span class="ruby-identifier">error_symbol</span> |
| 166 |
<span class="ruby-keyword kw">end</span> |
| 167 |
</pre> |
| 168 |
</div> |
| 169 |
</div> |
| 170 |
</div> |
| 171 |
|
| 172 |
|
| 173 |
</div> |
| 174 |
|
| 175 |
|
| 176 |
</div> |
| 177 |
|
| 178 |
|
| 179 |
<div id="validator-badges"> |
| 180 |
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> |
| 181 |
</div> |
| 182 |
|
| 183 |
</body> |
| 184 |
</html> |