402 lines
12 KiB
HTML
402 lines
12 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>Snippet</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
|
<link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
|
|
<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />
|
|
<script src="../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="../js/main.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="banner">
|
|
|
|
<h1>
|
|
<span class="type">Class</span>
|
|
Snippet
|
|
|
|
<span class="parent"><
|
|
|
|
ActiveRecord::Base
|
|
|
|
</span>
|
|
|
|
</h1>
|
|
<ul class="files">
|
|
|
|
<li><a href="../files/app/models/snippet_rb.html">app/models/snippet.rb</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
<div id="bodyContent">
|
|
<div id="content">
|
|
|
|
<div class="description">
|
|
|
|
<h2 id="label-Schema+Information">Schema Information</h2>
|
|
|
|
<p>Table name: snippets</p>
|
|
|
|
<pre>id :integer not null, primary key
|
|
title :string(255)
|
|
content :text
|
|
author_id :integer not null
|
|
project_id :integer not null
|
|
created_at :datetime not null
|
|
updated_at :datetime not null
|
|
file_name :string(255)
|
|
expires_at :datetime</pre>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Method ref -->
|
|
<div class="sectiontitle">Methods</div>
|
|
<dl class="methods">
|
|
|
|
<dt>C</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-c-content_types">content_types</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt>D</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-i-data">data</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt>E</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-i-expired-3F">expired?</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt>M</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-i-mode">mode</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt>N</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-i-name">name</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
<dt>S</dt>
|
|
<dd>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
<a href="#method-i-size">size</a>
|
|
</li>
|
|
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<!-- Includes -->
|
|
<div class="sectiontitle">Included Modules</div>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
Linguist::BlobHelper
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Methods -->
|
|
|
|
<div class="sectiontitle">Class Public methods</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-c-content_types">
|
|
|
|
<b>content_types</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-c-content_types" name="method-c-content_types" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-c-content_types_source')" id="l_method-c-content_types_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-c-content_types_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 38</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">content_types</span>
|
|
[
|
|
<span class="ruby-string">".rb"</span>, <span class="ruby-string">".py"</span>, <span class="ruby-string">".pl"</span>, <span class="ruby-string">".scala"</span>, <span class="ruby-string">".c"</span>, <span class="ruby-string">".cpp"</span>, <span class="ruby-string">".java"</span>,
|
|
<span class="ruby-string">".haml"</span>, <span class="ruby-string">".html"</span>, <span class="ruby-string">".sass"</span>, <span class="ruby-string">".scss"</span>, <span class="ruby-string">".xml"</span>, <span class="ruby-string">".php"</span>, <span class="ruby-string">".erb"</span>,
|
|
<span class="ruby-string">".js"</span>, <span class="ruby-string">".sh"</span>, <span class="ruby-string">".coffee"</span>, <span class="ruby-string">".yml"</span>, <span class="ruby-string">".md"</span>
|
|
]
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="sectiontitle">Instance Public methods</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-i-data">
|
|
|
|
<b>data</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-i-data" name="method-i-data" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-i-data_source')" id="l_method-i-data_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-i-data_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 46</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">data</span>
|
|
<span class="ruby-identifier">content</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-i-expired-3F">
|
|
|
|
<b>expired?</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-i-expired-3F" name="method-i-expired-3F" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-i-expired-3F_source')" id="l_method-i-expired-3F_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-i-expired-3F_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 62</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">expired?</span>
|
|
<span class="ruby-identifier">expires_at</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">expires_at</span> <span class="ruby-operator"><</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">current</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-i-mode">
|
|
|
|
<b>mode</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-i-mode" name="method-i-mode" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-i-mode_source')" id="l_method-i-mode_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-i-mode_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 58</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">mode</span>
|
|
<span class="ruby-keyword">nil</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-i-name">
|
|
|
|
<b>name</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-i-name" name="method-i-name" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-i-name_source')" id="l_method-i-name_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-i-name_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 54</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">name</span>
|
|
<span class="ruby-identifier">file_name</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="method">
|
|
<div class="title method-title" id="method-i-size">
|
|
|
|
<b>size</b>()
|
|
|
|
<a href="../classes/Snippet.html#method-i-size" name="method-i-size" class="permalink">Link</a>
|
|
</div>
|
|
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="sourcecode">
|
|
|
|
<p class="source-link">
|
|
Source:
|
|
<a href="javascript:toggleSource('method-i-size_source')" id="l_method-i-size_source">show</a>
|
|
|
|
</p>
|
|
<div id="method-i-size_source" class="dyn-source">
|
|
<pre><span class="ruby-comment"># File app/models/snippet.rb, line 50</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">size</span>
|
|
<span class="ruby-number">0</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html> |