PageRenderTime 53ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/docs/UnpackStrategy/Fossil.html

https://repo.or.cz/Homebrew/rubydoc.brew.sh.git
HTML | 294 lines | 159 code | 135 blank | 0 comment | 0 complexity | 829376ebffd32b2c6becd55a0b5316af MD5 | raw file
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>
  7. Class: UnpackStrategy::Fossil
  8. &mdash; Homebrew Ruby API
  9. </title>
  10. <link rel="stylesheet" href="../css/style.css" type="text/css" />
  11. <link rel="stylesheet" href="../css/common.css" type="text/css" />
  12. <script type="text/javascript">
  13. pathId = "UnpackStrategy::Fossil";
  14. relpath = '../';
  15. </script>
  16. <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
  17. <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
  18. </head>
  19. <body>
  20. <div class="nav_wrap">
  21. <iframe id="nav" src="../class_list.html?1"></iframe>
  22. <div id="resizer"></div>
  23. </div>
  24. <div id="main" tabindex="-1">
  25. <div id="header">
  26. <div id="menu">
  27. <a href="../_index.html">Index (F)</a> &raquo;
  28. <span class='title'><span class='object_link'><a href="../UnpackStrategy.html" title="UnpackStrategy (module)">UnpackStrategy</a></span></span>
  29. &raquo;
  30. <span class="title">Fossil</span>
  31. </div>
  32. <div id="search">
  33. <a class="full_list_link" id="class_list_link"
  34. href="../class_list.html">
  35. <svg width="24" height="24">
  36. <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
  37. <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
  38. <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
  39. </svg>
  40. </a>
  41. </div>
  42. <div class="clear"></div>
  43. </div>
  44. <div id="content"><h1>Class: UnpackStrategy::Fossil
  45. </h1>
  46. <div class="box_info">
  47. <dl>
  48. <dt>Inherits:</dt>
  49. <dd>
  50. <span class="inheritName">Object</span>
  51. <ul class="fullTree">
  52. <li>Object</li>
  53. <li class="next">UnpackStrategy::Fossil</li>
  54. </ul>
  55. <a href="#" class="inheritanceTree">show all</a>
  56. </dd>
  57. </dl>
  58. <dl>
  59. <dt>Includes:</dt>
  60. <dd><span class='object_link'><a href="../UnpackStrategy.html" title="UnpackStrategy (module)">UnpackStrategy</a></span></dd>
  61. </dl>
  62. <dl>
  63. <dt>Defined in:</dt>
  64. <dd>brew/Library/Homebrew/unpack_strategy/fossil.rb</dd>
  65. </dl>
  66. </div>
  67. <h2>Instance Attribute Summary</h2>
  68. <h3 class="inherited">Attributes included from <span class='object_link'><a href="../UnpackStrategy.html" title="UnpackStrategy (module)">UnpackStrategy</a></span></h3>
  69. <p class="inherited"><span class='object_link'><a href="../UnpackStrategy.html#merge_xattrs-instance_method" title="UnpackStrategy#merge_xattrs (method)">#merge_xattrs</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#path-instance_method" title="UnpackStrategy#path (method)">#path</a></span></p>
  70. <h2>
  71. Class Method Summary
  72. <small><a href="#" class="summary_toggle">collapse</a></small>
  73. </h2>
  74. <ul class="summary">
  75. <li class="public ">
  76. <span class="summary_signature">
  77. <a href="#can_extract%3F-class_method" title="can_extract? (class method)">.<strong>can_extract?</strong>(path) &#x21d2; Boolean </a>
  78. </span>
  79. <span class="summary_desc"><div class='inline'>
  80. </div></span>
  81. </li>
  82. <li class="public ">
  83. <span class="summary_signature">
  84. <a href="#extensions-class_method" title="extensions (class method)">.<strong>extensions</strong> &#x21d2; Object </a>
  85. </span>
  86. <span class="summary_desc"><div class='inline'>
  87. </div></span>
  88. </li>
  89. </ul>
  90. <h3 class="inherited">Methods included from <span class='object_link'><a href="../UnpackStrategy.html" title="UnpackStrategy (module)">UnpackStrategy</a></span></h3>
  91. <p class="inherited"><span class='object_link'><a href="../UnpackStrategy.html#dependencies-instance_method" title="UnpackStrategy#dependencies (method)">#dependencies</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#detect-class_method" title="UnpackStrategy.detect (method)">detect</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#extract-instance_method" title="UnpackStrategy#extract (method)">#extract</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#extract_nestedly-instance_method" title="UnpackStrategy#extract_nestedly (method)">#extract_nestedly</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#from_extension-class_method" title="UnpackStrategy.from_extension (method)">from_extension</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#from_magic-class_method" title="UnpackStrategy.from_magic (method)">from_magic</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#from_type-class_method" title="UnpackStrategy.from_type (method)">from_type</a></span>, <span class='object_link'><a href="../UnpackStrategy.html#initialize-instance_method" title="UnpackStrategy#initialize (method)">#initialize</a></span></p>
  92. <div id="class_method_details" class="method_details_list">
  93. <h2>Class Method Details</h2>
  94. <div class="method_details first">
  95. <h3 class="signature first" id="can_extract?-class_method">
  96. .<strong>can_extract?</strong>(path) &#x21d2; <tt>Boolean</tt>
  97. </h3><div class="docstring">
  98. <div class="discussion">
  99. </div>
  100. </div>
  101. <div class="tags">
  102. <p class="tag_title">Returns:</p>
  103. <ul class="return">
  104. <li>
  105. <span class='type'>(<tt>Boolean</tt>)</span>
  106. </li>
  107. </ul>
  108. </div><table class="source_code">
  109. <tr>
  110. <td>
  111. <pre class="lines">
  112. 13
  113. 14
  114. 15
  115. 16
  116. 17
  117. 18
  118. 19</pre>
  119. </td>
  120. <td>
  121. <pre class="code"><span class="info file"># File 'brew/Library/Homebrew/unpack_strategy/fossil.rb', line 13</span>
  122. <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_can_extract?'>can_extract?</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
  123. <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_magic_number'>magic_number</span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\ASQLite format 3\000</span><span class='regexp_end'>/n</span></span><span class='rparen'>)</span>
  124. <span class='comment'># Fossil database is made up of artifacts, so the `artifact` table must exist.
  125. </span> <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>select count(*) from sqlite_master where type = &#39;view&#39; and name = &#39;artifact&#39;</span><span class='tstring_end'>&quot;</span></span>
  126. <span class='id identifier rubyid_system_command'>system_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sqlite3</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>args:</span> <span class='lbracket'>[</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_query'>query</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_stdout'>stdout</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>==</span> <span class='int'>1</span>
  127. <span class='kw'>end</span></pre>
  128. </td>
  129. </tr>
  130. </table>
  131. </div>
  132. <div class="method_details ">
  133. <h3 class="signature " id="extensions-class_method">
  134. .<strong>extensions</strong> &#x21d2; <tt>Object</tt>
  135. </h3><table class="source_code">
  136. <tr>
  137. <td>
  138. <pre class="lines">
  139. 9
  140. 10
  141. 11</pre>
  142. </td>
  143. <td>
  144. <pre class="code"><span class="info file"># File 'brew/Library/Homebrew/unpack_strategy/fossil.rb', line 9</span>
  145. <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_extensions'>extensions</span>
  146. <span class='lbracket'>[</span><span class='rbracket'>]</span>
  147. <span class='kw'>end</span></pre>
  148. </td>
  149. </tr>
  150. </table>
  151. </div>
  152. </div>
  153. </div>
  154. <div id="footer">
  155. Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
  156. </div>
  157. </div>
  158. </body>
  159. </html>