<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.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" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <h1>JobTrigger <sup class="type-note">(Class)</sup></h1> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../files/checkjob_rb.html"> checkjob.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> <a href="P4Trigger.html"> P4Trigger </a> </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> The trigger class itself. The main method in here is validate() which is invoked from the super-class’ parse_change() method. </p> </div> <div id="method-list"> <h2 class="section-bar">Methods</h2> <div class="name-list"> <a href="#M000015">validate</a> </div> </div> </div> <!-- if includes --> <!-- if method_list --> <div id="methods"> <h2 class="section-bar">Public Instance methods</h2> <div id="method-M000015" class="method-detail"> <a name="M000015"></a> <div class="method-heading"> <a href="#M000015" class="method-signature"> <span class="method-name">validate</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Do the enforcement. </p> <p><a class="source-toggle" href="#" onclick="toggleCode('M000015-source');return false;">[Source]</a></p> <div class="method-source-code" id="M000015-source"> <pre> <span class="ruby-comment cmt"># File checkjob.rb, line 56</span> 56: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>() 57: <span class="ruby-keyword kw">if</span> ( <span class="ruby-identifier">change</span>.<span class="ruby-identifier">jobs</span>.<span class="ruby-identifier">length</span>() <span class="ruby-operator">==</span> <span class="ruby-value">0</span> ) 58: <span class="ruby-identifier">message</span>( @<span class="ruby-ivar">@USER_MESSAGE</span> ) 59: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span> 60: <span class="ruby-keyword kw">end</span> 61: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> 62: <span class="ruby-keyword kw">end</span> </pre> </div> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 6014 | Robert Cowham | Bring in Tony's latest trigger changes | ||
//guest/tony_smith/perforce/P4Rubylib/triggers/doc/classes/JobTrigger.html | |||||
#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. |