JobTrigger.html #1

  • //
  • guest/
  • tony_smith/
  • perforce/
  • P4Rubylib/
  • triggers/
  • doc/
  • classes/
  • JobTrigger.html
  • View
  • Commits
  • Open Download .zip Download (3 KB)
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: JobTrigger</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" />
  <script type="text/javascript" language="JavaScript">
  <!--
  function popCode(url) {
    window.open(url, "Code", 
          "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }
  //-->
  </script>
</head>

<body bgcolor="white">

<table summary="Information on class" width="100%" border="0" cellspacing="0">
 <tr class="title-row">
 <td class="big-title-font">
   <sup><font color="aqua">Class</font></sup> JobTrigger
 </td>
 <td align="right">
   <table summary="layout" cellspacing="0" cellpadding="2">
     <tr valign="top">
      <td class="small-title-font">In:</td>
      <td class="small-title-font">
        <a href="../files/checkjob_rb.html" class="aqua">
checkjob.rb
         </a>
<br />
      </td>
     </tr>
     <tr>
      <td class="small-title-font">Parent:</td>
      <td class="small-title-font">
        <a href="P4Trigger.html" class="aqua">
P4Trigger
         </a>
      </td>
     </tr>
   </table>
  </td>
  </tr>
</table>
  <!-- banner header -->



<div class="description"><p>
The trigger class itself. The main method in here is validate() which is
invoked from the super-class&#8217; <a
href="P4Trigger.html#M000021">parse_change</a>() method.
</p>
</div>


<table summary="Methods" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Methods</td></tr>
</table>
<div class="name-list">
<a href="#M000009">validate</a>&nbsp; &nbsp;
</div>





<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Public Instance methods</td></tr>
</table>
<table summary="method"  width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000009"></a>
<b>validate</b>()
</td></tr>
</table>
<div class="description">
<p>
Do the enforcement.
</p>
</div>
<pre class="source">
<span class="cmt"># File checkjob.rb, line 56</span>
    <span class="kw">def</span> validate()
        <span class="kw">if</span> ( change.jobs.length() == 0 )
            message( @@USER_MESSAGE )
            <span class="kw">return</span> <span class="kw">false</span>
        <span class="kw">end</span>
        <span class="kw">return</span> <span class="kw">true</span>
    <span class="kw">end</span>
</pre>

</body>
</html>
# Change User Description Committed
#3 4654 Tony Smith Add an example spec trigger to show how you might restrict the
default view for all new clients to a pre-defined set of
mappings.
#2 4640 Tony Smith Add a sample post-commit trigger that can be used to keep a master
and slave branch in sync.
#1 3637 Tony Smith Add RDoc documentation to the sample triggers.