doc/rdoc/classes/RFuzz/Browser.src/M000085.html in rfuzz-0.8 vs doc/rdoc/classes/RFuzz/Browser.src/M000085.html in rfuzz-0.9

- old
+ new

@@ -3,22 +3,21 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>links (RFuzz::Browser)</title> + <title>start (RFuzz::Browser)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> - <pre> <span class="ruby-comment cmt"># File lib/rfuzz/browser.rb, line 42</span> -42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">links</span>(<span class="ruby-identifier">matching</span>=<span class="ruby-keyword kw">nil</span>) -43: <span class="ruby-identifier">links</span> = <span class="ruby-ivar">@doc</span><span class="ruby-operator">/</span><span class="ruby-identifier">:a</span> -44: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">matching</span> -45: <span class="ruby-comment cmt"># return only the ones that match</span> -46: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">links</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">matching</span> <span class="ruby-operator">===</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">attributes</span>[<span class="ruby-value str">&quot;href&quot;</span>]} -47: <span class="ruby-keyword kw">else</span> -48: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">links</span> -49: <span class="ruby-keyword kw">end</span> -50: <span class="ruby-keyword kw">end</span></pre> + <pre> <span class="ruby-comment cmt"># File lib/rfuzz/browser.rb, line 30</span> +30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>, <span class="ruby-identifier">ops</span>={}) +31: <span class="ruby-ivar">@response</span> = <span class="ruby-ivar">@client</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">uri</span>,<span class="ruby-identifier">ops</span>) +32: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@response</span>.<span class="ruby-identifier">http_status</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;200&quot;</span> +33: <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Invalid status: #{@response.http_status}&quot;</span> +34: <span class="ruby-keyword kw">end</span> +35: +36: <span class="ruby-ivar">@doc</span> = <span class="ruby-constant">Hpricot</span>(<span class="ruby-ivar">@response</span>.<span class="ruby-identifier">http_body</span>) +37: <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file