Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 135bc52904e74f332d0a037a046b5c11 > files > 24

ruby-icon-artist-0.1.92-1.fc13.noarch.rpm

<?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>in_branch (IconArtist::GitRepo)</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/icon-artist/gitrepo.rb, line 58</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">in_branch</span>
      <span class="ruby-identifier">old_current</span> = <span class="ruby-ivar">@git</span>.<span class="ruby-identifier">current_branch</span>
      <span class="ruby-keyword kw">yield</span>
      <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@git</span>.<span class="ruby-identifier">current_branch</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">old_current</span>
        <span class="ruby-identifier">checkout</span>(<span class="ruby-identifier">old_current</span>)
      <span class="ruby-keyword kw">end</span>
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>