/[hyperestraier]/upstream/0.5.3/doc/rbapidoc/classes/Estraier/Node.src/M000011.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /upstream/0.5.3/doc/rbapidoc/classes/Estraier/Node.src/M000011.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Wed Aug 3 15:25:48 2005 UTC (18 years, 8 months ago) by dpavlin
File MIME type: text/html
File size: 3952 byte(s)
import of upstream 0.5.3

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>get_doc_attr (Estraier::Node)</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 estraier.rb, line 498</span>
14 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_doc_attr</span>(<span class="ruby-identifier">id</span>, <span class="ruby-identifier">name</span>)
15 <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_types</span>({ <span class="ruby-identifier">id</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">Integer</span>, <span class="ruby-identifier">name</span>=<span class="ruby-operator">&gt;</span><span class="ruby-constant">String</span> }) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$DEBUG</span>
16 <span class="ruby-ivar">@status</span> = <span class="ruby-value">-1</span>
17 <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-ivar">@url</span>
18 <span class="ruby-identifier">turl</span> = <span class="ruby-ivar">@url</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;/get_doc_attr&quot;</span>
19 <span class="ruby-identifier">reqheads</span> = [ <span class="ruby-value str">&quot;Content-Type: application/x-www-form-urlencoded&quot;</span> ]
20 <span class="ruby-identifier">reqheads</span>.<span class="ruby-identifier">push</span>(<span class="ruby-value str">&quot;Authorization: Basic &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">base_encode</span>(<span class="ruby-ivar">@auth</span>)) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@auth</span>
21 <span class="ruby-identifier">reqbody</span> = <span class="ruby-value str">&quot;id=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;&amp;attr=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-constant">URI</span><span class="ruby-operator">::</span><span class="ruby-identifier">encode</span>(<span class="ruby-identifier">name</span>)
22 <span class="ruby-identifier">resbody</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
23 <span class="ruby-identifier">rv</span> = <span class="ruby-constant">Utility</span><span class="ruby-operator">::</span><span class="ruby-identifier">shuttle_url</span>(<span class="ruby-identifier">turl</span>, <span class="ruby-ivar">@pxhost</span>, <span class="ruby-ivar">@pxport</span>, <span class="ruby-ivar">@timeout</span>, <span class="ruby-identifier">reqheads</span>, <span class="ruby-identifier">reqbody</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">resbody</span>)
24 <span class="ruby-ivar">@status</span> = <span class="ruby-identifier">rv</span>
25 <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rv</span> <span class="ruby-operator">!=</span> <span class="ruby-value">200</span>
26 <span class="ruby-identifier">resbody</span>.<span class="ruby-identifier">string</span>.<span class="ruby-identifier">chomp</span>
27 <span class="ruby-keyword kw">end</span></pre>
28 </body>
29 </html>

  ViewVC Help
Powered by ViewVC 1.1.26