docs/Miningcompany.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Miningcompany</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Miningcompany</h1>
<section>
<header>
<h2>
Miningcompany
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Miningcompany"><span class="type-signature"></span>new Miningcompany<span class="signature">(maps, <span class="optional">options</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Constructor for a mining company.
Module should be instantiated with "new Miningcompany(maps, options)"
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>maps</code></td>
<td class="type">
<span class="param-type">object</span>
|
<span class="param-type">Array.<object></span>
</td>
<td class="attributes">
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line17">line 17</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="mine"><span class="type-signature"></span>mine<span class="signature">(miner, maps, options)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Starts the miner.
Will emit a cart object for each mined url.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>miner</code></td>
<td class="type">
<span class="param-type">Krawler</span>
</td>
<td class="description last">An instance of node-krawler.</td>
</tr>
<tr>
<td class="name"><code>maps</code></td>
<td class="type">
<span class="param-type">object</span>
|
<span class="param-type">Array.<object></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line101">line 101</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="open"><span class="type-signature"></span>open<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Opens the mining company.
Will set up the scheduler.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line71">line 71</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="plan"><span class="type-signature"></span>plan<span class="signature">(options)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Sets up the scheduler.
Will call "mine" according to provided schedule.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line83">line 83</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="shut"><span class="type-signature"></span>shut<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Shuts down the company. It will no longer mine.
It can, however, be opened again with open().
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line162">line 162</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="wash"><span class="type-signature"></span>wash<span class="signature">(cart)</span><span class="type-signature"> → {object}</span></h4>
</dt>
<dd>
<div class="description">
node-goldwasher can be turned on with the option "goldwasher: true".
This will add a "gold" property with the goldwasher result of each url.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cart</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="miningcompany.js.html">miningcompany.js</a>, <a href="miningcompany.js.html#line147">line 147</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Miningcompany.html">Miningcompany</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha5</a> on Sun Oct 26 2014 19:19:11 GMT+0100 (CET)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>