doc/AdMan/Keyword.html
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>class AdMan::Keyword - RDoc Documentation</title>
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
<script type="text/javascript">
var rdoc_rel_prefix = "../";
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
<body id="top" class="class">
<nav id="metadata">
<nav id="home-section" class="section">
<h3 class="section-header">
<a href="../index.html">Home</a>
<a href="../table_of_contents.html#classes">Classes</a>
<a href="../table_of_contents.html#methods">Methods</a>
</h3>
</nav>
<nav id="search-section" class="section project-section" class="initially-hidden">
<form action="#" method="get" accept-charset="utf-8">
<h3 class="section-header">
<input type="text" name="search" placeholder="Search" id="search-field"
title="Type to search, Up and Down to navigate, Enter to load">
</h3>
</form>
<ul id="search-results" class="initially-hidden"></ul>
</nav>
<div id="file-metadata">
<nav id="file-list-section" class="section">
<h3 class="section-header">Defined In</h3>
<ul>
<li>app/models/ad_man/keyword.rb
</ul>
</nav>
</div>
<div id="class-metadata">
<nav id="parent-class-section" class="section">
<h3 class="section-header">Parent</h3>
<p class="link">ActiveRecord::Base
</nav>
<!-- Method Quickref -->
<nav id="method-list-section" class="section">
<h3 class="section-header">Methods</h3>
<ul class="link-list">
<li><a href="#method-c-available">::available</a>
<li><a href="#method-c-unavailable">::unavailable</a>
<li><a href="#method-i-number_of_ads">#number_of_ads</a>
<li><a href="#method-i-to_s">#to_s</a>
</ul>
</nav>
</div>
<div id="project-metadata">
<nav id="fileindex-section" class="section project-section">
<h3 class="section-header">Pages</h3>
<ul>
<li class="file"><a href="../Gemfile.html">Gemfile</a>
<li class="file"><a href="../MIT-LICENSE.html">MIT-LICENSE</a>
<li class="file"><a href="../Rakefile.html">Rakefile</a>
<li class="file"><a href="../test/dummy/README_rdoc.html">README</a>
<li class="file"><a href="../test/dummy/Rakefile.html">Rakefile</a>
</ul>
</nav>
<nav id="classindex-section" class="section project-section">
<h3 class="section-header">Class and Module Index</h3>
<ul class="link-list">
<li><a href="../AdMan.html">AdMan</a>
<li><a href="../AdMan/Advertisement.html">AdMan::Advertisement</a>
<li><a href="../AdMan/AdvertisementTest.html">AdMan::AdvertisementTest</a>
<li><a href="../AdMan/AdvertisementsController.html">AdMan::AdvertisementsController</a>
<li><a href="../AdMan/AdvertisementsControllerTest.html">AdMan::AdvertisementsControllerTest</a>
<li><a href="../AdMan/AdvertisementsHelper.html">AdMan::AdvertisementsHelper</a>
<li><a href="../AdMan/AdvertisementsHelperTest.html">AdMan::AdvertisementsHelperTest</a>
<li><a href="../AdMan/ApplicationController.html">AdMan::ApplicationController</a>
<li><a href="../AdMan/ApplicationHelper.html">AdMan::ApplicationHelper</a>
<li><a href="../AdMan/Engine.html">AdMan::Engine</a>
<li><a href="../AdMan/InstallGenerator.html">AdMan::InstallGenerator</a>
<li><a href="../AdMan/Keyword.html">AdMan::Keyword</a>
<li><a href="../AdMan/KeywordTest.html">AdMan::KeywordTest</a>
<li><a href="../AdMan/KeywordsController.html">AdMan::KeywordsController</a>
<li><a href="../AdMan/KeywordsControllerTest.html">AdMan::KeywordsControllerTest</a>
<li><a href="../AdMan/KeywordsHelper.html">AdMan::KeywordsHelper</a>
<li><a href="../AdMan/KeywordsHelperTest.html">AdMan::KeywordsHelperTest</a>
<li><a href="../Dummy.html">Dummy</a>
<li><a href="../Dummy/Application.html">Dummy::Application</a>
<li><a href="../AdManTest.html">AdManTest</a>
<li><a href="../ApplicationController.html">ApplicationController</a>
<li><a href="../ApplicationHelper.html">ApplicationHelper</a>
<li><a href="../CreateAdManAdvertisements.html">CreateAdManAdvertisements</a>
<li><a href="../CreateAdManKeywords.html">CreateAdManKeywords</a>
<li><a href="../NavigationTest.html">NavigationTest</a>
<li><a href="../Object.html">Object</a>
</ul>
</nav>
</div>
</nav>
<div id="documentation">
<h1 class="class">class AdMan::Keyword</h1>
<div id="description" class="description">
</div><!-- description -->
<section id="5Buntitled-5D" class="documentation-section">
<!-- Constants -->
<section id="constants-list" class="section">
<h3 class="section-header">Constants</h3>
<dl>
<dt id="MAX_COUNT">MAX_COUNT
<dd class="description">
</dl>
</section>
<!-- Methods -->
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
<h3 class="section-header">Public Class Methods</h3>
<div id="method-c-available" class="method-detail ">
<div class="method-heading">
<span class="method-name">available</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code" id="available-source">
<pre><span class="ruby-comment"># File app/models/ad_man/keyword.rb, line 15</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">available</span>
<span class="ruby-constant">Keyword</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">keyword</span><span class="ruby-operator">|</span> <span class="ruby-identifier">keyword</span>.<span class="ruby-identifier">advertisements</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator"><</span> <span class="ruby-constant">MAX_COUNT</span>}
<span class="ruby-keyword">end</span></pre>
</div><!-- available-source -->
</div>
</div><!-- available-method -->
<div id="method-c-unavailable" class="method-detail ">
<div class="method-heading">
<span class="method-name">unavailable</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code" id="unavailable-source">
<pre><span class="ruby-comment"># File app/models/ad_man/keyword.rb, line 19</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">unavailable</span>
<span class="ruby-constant">Keyword</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">keyword</span><span class="ruby-operator">|</span> <span class="ruby-identifier">keyword</span>.<span class="ruby-identifier">advertisements</span>.<span class="ruby-identifier">count</span> <span class="ruby-operator">>=</span> <span class="ruby-constant">MAX_COUNT</span>}
<span class="ruby-keyword">end</span></pre>
</div><!-- unavailable-source -->
</div>
</div><!-- unavailable-method -->
</section><!-- public-class-method-details -->
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
<h3 class="section-header">Public Instance Methods</h3>
<div id="method-i-number_of_ads" class="method-detail ">
<div class="method-heading">
<span class="method-name">number_of_ads</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code" id="number_of_ads-source">
<pre><span class="ruby-comment"># File app/models/ad_man/keyword.rb, line 12</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">number_of_ads</span>
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">advertisements</span>.<span class="ruby-identifier">count</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- number_of_ads-source -->
</div>
</div><!-- number_of_ads-method -->
<div id="method-i-to_s" class="method-detail ">
<div class="method-heading">
<span class="method-name">to_s</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code" id="to_s-source">
<pre><span class="ruby-comment"># File app/models/ad_man/keyword.rb, line 8</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">to_s</span>
<span class="ruby-identifier">name</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- to_s-source -->
</div>
</div><!-- to_s-method -->
</section><!-- public-instance-method-details -->
</section><!-- 5Buntitled-5D -->
</div><!-- documentation -->
<footer id="validator-badges">
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>