Sha256: 14cf8cbda1a08f38968ce5d95ff781a8d9879d8e8952b6c82d1fd0740598ae8d

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>shorten (ShortURL)</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/shorturl.rb, line 210</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">shorten</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">service</span> = <span class="ruby-identifier">:rubyurl</span>)
    <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_services</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">service</span>
      <span class="ruby-ivar">@@services</span>[<span class="ruby-identifier">service</span>].<span class="ruby-identifier">call</span>(<span class="ruby-identifier">url</span>)
    <span class="ruby-keyword kw">else</span>
      <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidService</span>
    <span class="ruby-keyword kw">end</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
caleb-shorturl-0.8.9 doc/classes/ShortURL.src/M000002.html
shorturl-0.8.8 doc/classes/ShortURL.src/M000002.html
shorturl-0.8.7 doc/classes/ShortURL.src/M000002.html
shorturl-0.8.6 doc/classes/ShortURL.src/M000002.html