Sha256: e57fe59a4df1961936a9205a16fd9130dc7e7ca889ab4dbf3cc85d0ae62b15ca

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 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>initialize (Reap)</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/reap/task.rb, line 56</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">initialize</span>
    <span class="ruby-ivar">@tasks</span> <span class="ruby-operator">||=</span> {}
    <span class="ruby-identifier">registry</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
      <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">section_required?</span>
        <span class="ruby-keyword kw">if</span> <span class="ruby-operator">::</span><span class="ruby-constant">ProjectInfo</span>.<span class="ruby-identifier">info</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">klass</span>.<span class="ruby-identifier">task_name</span>)
          <span class="ruby-ivar">@tasks</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>
        <span class="ruby-keyword kw">end</span>
      <span class="ruby-keyword kw">else</span>
        <span class="ruby-ivar">@tasks</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">new</span>
      <span class="ruby-keyword kw">end</span>
    }
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reap-4.0.0 web/rdoc/classes/Reap.src/M000025.html