Sha256: 18d83041332d593e9d30b9596a752a562214af04d7ea37e7ec580aea3066fcdb

Contents?: true

Size: 1.38 KB

Versions: 1

Compression:

Stored size: 1.38 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>event_callback (Rev::Watcher)</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/rev/watcher.rb, line 35</span>
35:     <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">event_callback</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">methods</span>)
36:       <span class="ruby-identifier">methods</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">method</span><span class="ruby-operator">|</span>
37:         <span class="ruby-identifier">module_eval</span> <span class="ruby-value str">&quot;def \#{method}(*args, &amp;block)\nif block\n@\#{method}_callback = block\nreturn\nend\n\nif @\#{method}_callback\ninstance_exec(*args, &amp;@\#{method}_callback)\nend\nend\n&quot;</span>
38:       <span class="ruby-keyword kw">end</span>
39:     <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rev-0.1.2 doc/rdoc/classes/Rev/Watcher.src/M000111.html