PageRenderTime 62ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/code/classes/SystemHook.html

https://bitbucket.org/burnsjeremy/gitlabhq
HTML | 191 lines | 103 code | 86 blank | 2 comment | 0 complexity | aedfe19db7e72ab1eff424ab13e8bbae MD5 | raw file
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <title>SystemHook</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  8. <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
  9. <link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
  10. <link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />
  11. <script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
  12. <script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
  13. <script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
  14. <script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
  15. </head>
  16. <body>
  17. <div class="banner">
  18. <h1>
  19. <span class="type">Class</span>
  20. SystemHook
  21. <span class="parent">&lt;
  22. <a href="WebHook.html">WebHook</a>
  23. </span>
  24. </h1>
  25. <ul class="files">
  26. <li><a href="../files/app/models/system_hook_rb.html">app/models/system_hook.rb</a></li>
  27. </ul>
  28. </div>
  29. <div id="bodyContent">
  30. <div id="content">
  31. <div class="description">
  32. <h2 id="label-Schema+Information">Schema Information</h2>
  33. <p>Table name: web_hooks</p>
  34. <pre>id :integer not null, primary key
  35. url :string(255)
  36. project_id :integer
  37. created_at :datetime not null
  38. updated_at :datetime not null
  39. type :string(255) default(&quot;ProjectHook&quot;)
  40. service_id :integer</pre>
  41. </div>
  42. <!-- Method ref -->
  43. <div class="sectiontitle">Methods</div>
  44. <dl class="methods">
  45. <dt>A</dt>
  46. <dd>
  47. <ul>
  48. <li>
  49. <a href="#method-c-all_hooks_fire">all_hooks_fire</a>,
  50. </li>
  51. <li>
  52. <a href="#method-i-async_execute">async_execute</a>
  53. </li>
  54. </ul>
  55. </dd>
  56. </dl>
  57. <!-- Methods -->
  58. <div class="sectiontitle">Class Public methods</div>
  59. <div class="method">
  60. <div class="title method-title" id="method-c-all_hooks_fire">
  61. <b>all_hooks_fire</b>(data)
  62. <a href="../classes/SystemHook.html#method-c-all_hooks_fire" name="method-c-all_hooks_fire" class="permalink">Link</a>
  63. </div>
  64. <div class="description">
  65. </div>
  66. <div class="sourcecode">
  67. <p class="source-link">
  68. Source:
  69. <a href="javascript:toggleSource('method-c-all_hooks_fire_source')" id="l_method-c-all_hooks_fire_source">show</a>
  70. </p>
  71. <div id="method-c-all_hooks_fire_source" class="dyn-source">
  72. <pre><span class="ruby-comment"># File app/models/system_hook.rb, line 15</span>
  73. <span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">all_hooks_fire</span>(<span class="ruby-identifier">data</span>)
  74. <span class="ruby-constant">SystemHook</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">sh</span><span class="ruby-operator">|</span>
  75. <span class="ruby-identifier">sh</span>.<span class="ruby-identifier">async_execute</span> <span class="ruby-identifier">data</span>
  76. <span class="ruby-keyword">end</span>
  77. <span class="ruby-keyword">end</span></pre>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="sectiontitle">Instance Public methods</div>
  82. <div class="method">
  83. <div class="title method-title" id="method-i-async_execute">
  84. <b>async_execute</b>(data)
  85. <a href="../classes/SystemHook.html#method-i-async_execute" name="method-i-async_execute" class="permalink">Link</a>
  86. </div>
  87. <div class="description">
  88. </div>
  89. <div class="sourcecode">
  90. <p class="source-link">
  91. Source:
  92. <a href="javascript:toggleSource('method-i-async_execute_source')" id="l_method-i-async_execute_source">show</a>
  93. </p>
  94. <div id="method-i-async_execute_source" class="dyn-source">
  95. <pre><span class="ruby-comment"># File app/models/system_hook.rb, line 21</span>
  96. <span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">async_execute</span>(<span class="ruby-identifier">data</span>)
  97. <span class="ruby-constant">Resque</span>.<span class="ruby-identifier">enqueue</span>(<span class="ruby-constant">SystemHookWorker</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">data</span>)
  98. <span class="ruby-keyword">end</span></pre>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </body>
  105. </html>