942 lines
36 KiB
HTML
942 lines
36 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
|
|
<title>Class: Calentry</title>
|
|
|
|
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
|
|
|
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
</head>
|
|
<body id="top" class="class">
|
|
|
|
<div id="metadata">
|
|
<div id="home-metadata">
|
|
<div id="home-section" class="section">
|
|
<h3 class="section-header">
|
|
<a href="./index.html">Home</a>
|
|
<a href="./index.html#classes">Classes</a>
|
|
<a href="./index.html#methods">Methods</a>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="file-metadata">
|
|
<div id="file-list-section" class="section">
|
|
<h3 class="section-header">In Files</h3>
|
|
<div class="section-body">
|
|
<ul>
|
|
|
|
<li><a href="./app/models/calentry_rb.html?TB_iframe=true&height=550&width=785"
|
|
class="thickbox" title="app/models/calentry.rb">app/models/calentry.rb</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="class-metadata">
|
|
|
|
<!-- Parent Class -->
|
|
<div id="parent-class-section" class="section">
|
|
<h3 class="section-header">Parent</h3>
|
|
|
|
<p class="link">ActiveRecord::Base</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Method Quickref -->
|
|
<div id="method-list-section" class="section">
|
|
<h3 class="section-header">Methods</h3>
|
|
<ul class="link-list">
|
|
|
|
<li><a href="#method-c-updated_at">::updated_at</a></li>
|
|
|
|
<li><a href="#method-i-dauer">#dauer</a></li>
|
|
|
|
<li><a href="#method-i-dauer-3D">#dauer=</a></li>
|
|
|
|
<li><a href="#method-i-days_to_today">#days_to_today</a></li>
|
|
|
|
<li><a href="#method-i-get_public">#get_public</a></li>
|
|
|
|
<li><a href="#method-i-icon_text">#icon_text</a></li>
|
|
|
|
<li><a href="#method-i-is_ongoing-3F">#is_ongoing?</a></li>
|
|
|
|
<li><a href="#method-i-is_past-3F">#is_past?</a></li>
|
|
|
|
<li><a href="#method-i-is_upcomming-3F">#is_upcomming?</a></li>
|
|
|
|
<li><a href="#method-i-name">#name</a></li>
|
|
|
|
<li><a href="#method-i-s_time-3D">#s_time=</a></li>
|
|
|
|
<li><a href="#method-i-start1">#start1</a></li>
|
|
|
|
<li><a href="#method-i-start_time">#start_time</a></li>
|
|
|
|
<li><a href="#method-i-text">#text</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="project-metadata">
|
|
|
|
|
|
<div id="fileindex-section" class="section project-section">
|
|
<h3 class="section-header">Files</h3>
|
|
<ul>
|
|
|
|
<li class="file"><a href="./doc/README_FOR_APP.html">README_FOR_APP</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="classindex-section" class="section project-section">
|
|
<h3 class="section-header">Class/Module Index
|
|
<span class="search-toggle"><img src="./images/find.png"
|
|
height="16" width="16" alt="[+]"
|
|
title="show/hide quicksearch" /></span></h3>
|
|
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
<fieldset>
|
|
<legend>Quicksearch</legend>
|
|
<input type="text" name="quicksearch" value=""
|
|
class="quicksearch-field" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
<ul class="link-list">
|
|
|
|
<li><a href="./Flagable.html">Flagable</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController.html">Flagable::ActsAsFlagableController</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/ClassMethods.html">Flagable::ActsAsFlagableController::ClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/LocalClassMethods.html">Flagable::ActsAsFlagableController::LocalClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/LocalInstanceMethods.html">Flagable::ActsAsFlagableController::LocalInstanceMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord.html">Flagable::ActsAsFlagableRecord</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord/ClassMethods.html">Flagable::ActsAsFlagableRecord::ClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord/LocalInstanceMethods.html">Flagable::ActsAsFlagableRecord::LocalInstanceMethods</a></li>
|
|
|
|
<li><a href="./Flagable/FlagableHelper.html">Flagable::FlagableHelper</a></li>
|
|
|
|
<li><a href="./Survey.html">Survey</a></li>
|
|
|
|
<li><a href="./Survey/Answer.html">Survey::Answer</a></li>
|
|
|
|
<li><a href="./Survey/AnswersHelper.html">Survey::AnswersHelper</a></li>
|
|
|
|
<li><a href="./Survey/Choice.html">Survey::Choice</a></li>
|
|
|
|
<li><a href="./Survey/ChoicesController.html">Survey::ChoicesController</a></li>
|
|
|
|
<li><a href="./Survey/ChoicesHelper.html">Survey::ChoicesHelper</a></li>
|
|
|
|
<li><a href="./Survey/Question.html">Survey::Question</a></li>
|
|
|
|
<li><a href="./Survey/QuestionsController.html">Survey::QuestionsController</a></li>
|
|
|
|
<li><a href="./Survey/QuestionsHelper.html">Survey::QuestionsHelper</a></li>
|
|
|
|
<li><a href="./IsCommentable.html">IsCommentable</a></li>
|
|
|
|
<li><a href="./IsCommentable/InstanceMethods.html">IsCommentable::InstanceMethods</a></li>
|
|
|
|
<li><a href="./LikeVoteable.html">LikeVoteable</a></li>
|
|
|
|
<li><a href="./LikeVoteable/InstanceMethods.html">LikeVoteable::InstanceMethods</a></li>
|
|
|
|
<li><a href="./Users.html">Users</a></li>
|
|
|
|
<li><a href="./Users/OmniauthCallbacksController.html">Users::OmniauthCallbacksController</a></li>
|
|
|
|
<li><a href="./Ability.html">Ability</a></li>
|
|
|
|
<li><a href="./ApplicationController.html">ApplicationController</a></li>
|
|
|
|
<li><a href="./ApplicationHelper.html">ApplicationHelper</a></li>
|
|
|
|
<li><a href="./Attachment.html">Attachment</a></li>
|
|
|
|
<li><a href="./AttachmentUploader.html">AttachmentUploader</a></li>
|
|
|
|
<li><a href="./AttachmentsController.html">AttachmentsController</a></li>
|
|
|
|
<li><a href="./AttachmentsHelper.html">AttachmentsHelper</a></li>
|
|
|
|
<li><a href="./Beispiel.html">Beispiel</a></li>
|
|
|
|
<li><a href="./BeispieldateiUploader.html">BeispieldateiUploader</a></li>
|
|
|
|
<li><a href="./BeispieleController.html">BeispieleController</a></li>
|
|
|
|
<li><a href="./BeispieleHelper.html">BeispieleHelper</a></li>
|
|
|
|
<li><a href="./Calendar.html">Calendar</a></li>
|
|
|
|
<li><a href="./CalendarsController.html">CalendarsController</a></li>
|
|
|
|
<li><a href="./CalendarsHelper.html">CalendarsHelper</a></li>
|
|
|
|
<li><a href="./CalentriesController.html">CalentriesController</a></li>
|
|
|
|
<li><a href="./CalentriesHelper.html">CalentriesHelper</a></li>
|
|
|
|
<li><a href="./Calentry.html">Calentry</a></li>
|
|
|
|
<li><a href="./CheckboxAutocompleteInput.html">CheckboxAutocompleteInput</a></li>
|
|
|
|
<li><a href="./Comment.html">Comment</a></li>
|
|
|
|
<li><a href="./CommentsController.html">CommentsController</a></li>
|
|
|
|
<li><a href="./CommentsHelper.html">CommentsHelper</a></li>
|
|
|
|
<li><a href="./ConfigController.html">ConfigController</a></li>
|
|
|
|
<li><a href="./Confirmmailer.html">Confirmmailer</a></li>
|
|
|
|
<li><a href="./CrawlerController.html">CrawlerController</a></li>
|
|
|
|
<li><a href="./Crawlobject.html">Crawlobject</a></li>
|
|
|
|
<li><a href="./CrawlobjectHelper.html">CrawlobjectHelper</a></li>
|
|
|
|
<li><a href="./DateStringInput.html">DateStringInput</a></li>
|
|
|
|
<li><a href="./DatepickerInput.html">DatepickerInput</a></li>
|
|
|
|
<li><a href="./DatetimepickerInput.html">DatetimepickerInput</a></li>
|
|
|
|
<li><a href="./Document.html">Document</a></li>
|
|
|
|
<li><a href="./DocumentsController.html">DocumentsController</a></li>
|
|
|
|
<li><a href="./EmailsController.html">EmailsController</a></li>
|
|
|
|
<li><a href="./Fetprofile.html">Fetprofile</a></li>
|
|
|
|
<li><a href="./FetprofilesController.html">FetprofilesController</a></li>
|
|
|
|
<li><a href="./FetprofilesHelper.html">FetprofilesHelper</a></li>
|
|
|
|
<li><a href="./Fetznedition.html">Fetznedition</a></li>
|
|
|
|
<li><a href="./FetzneditionsController.html">FetzneditionsController</a></li>
|
|
|
|
<li><a href="./FetzneditionsHelper.html">FetzneditionsHelper</a></li>
|
|
|
|
<li><a href="./Foto.html">Foto</a></li>
|
|
|
|
<li><a href="./FotoUploader.html">FotoUploader</a></li>
|
|
|
|
<li><a href="./FotosController.html">FotosController</a></li>
|
|
|
|
<li><a href="./FotosHelper.html">FotosHelper</a></li>
|
|
|
|
<li><a href="./Frage.html">Frage</a></li>
|
|
|
|
<li><a href="./FragenController.html">FragenController</a></li>
|
|
|
|
<li><a href="./FragenHelper.html">FragenHelper</a></li>
|
|
|
|
<li><a href="./GalleriesController.html">GalleriesController</a></li>
|
|
|
|
<li><a href="./GalleriesHelper.html">GalleriesHelper</a></li>
|
|
|
|
<li><a href="./Gallery.html">Gallery</a></li>
|
|
|
|
<li><a href="./GremienController.html">GremienController</a></li>
|
|
|
|
<li><a href="./GremienHelper.html">GremienHelper</a></li>
|
|
|
|
<li><a href="./Gremium.html">Gremium</a></li>
|
|
|
|
<li><a href="./HomeController.html">HomeController</a></li>
|
|
|
|
<li><a href="./Key.html">Key</a></li>
|
|
|
|
<li><a href="./Lecturer.html">Lecturer</a></li>
|
|
|
|
<li><a href="./LecturersController.html">LecturersController</a></li>
|
|
|
|
<li><a href="./LecturersHelper.html">LecturersHelper</a></li>
|
|
|
|
<li><a href="./Lva.html">Lva</a></li>
|
|
|
|
<li><a href="./LvasController.html">LvasController</a></li>
|
|
|
|
<li><a href="./MailerHelper.html">MailerHelper</a></li>
|
|
|
|
<li><a href="./Meeting.html">Meeting</a></li>
|
|
|
|
<li><a href="./MeetingsController.html">MeetingsController</a></li>
|
|
|
|
<li><a href="./MeetingsHelper.html">MeetingsHelper</a></li>
|
|
|
|
<li><a href="./Meetingtyp.html">Meetingtyp</a></li>
|
|
|
|
<li><a href="./MeetingtypsController.html">MeetingtypsController</a></li>
|
|
|
|
<li><a href="./MeetingtypsHelper.html">MeetingtypsHelper</a></li>
|
|
|
|
<li><a href="./Membership.html">Membership</a></li>
|
|
|
|
<li><a href="./MembershipsController.html">MembershipsController</a></li>
|
|
|
|
<li><a href="./MembershipsHelper.html">MembershipsHelper</a></li>
|
|
|
|
<li><a href="./Modul.html">Modul</a></li>
|
|
|
|
<li><a href="./Modulgruppe.html">Modulgruppe</a></li>
|
|
|
|
<li><a href="./ModulgruppenController.html">ModulgruppenController</a></li>
|
|
|
|
<li><a href="./ModulgruppenHelper.html">ModulgruppenHelper</a></li>
|
|
|
|
<li><a href="./ModulsController.html">ModulsController</a></li>
|
|
|
|
<li><a href="./ModulsHelper.html">ModulsHelper</a></li>
|
|
|
|
<li><a href="./Neuigkeit.html">Neuigkeit</a></li>
|
|
|
|
<li><a href="./NeuigkeitenController.html">NeuigkeitenController</a></li>
|
|
|
|
<li><a href="./NewsMailer.html">NewsMailer</a></li>
|
|
|
|
<li><a href="./Nlink.html">Nlink</a></li>
|
|
|
|
<li><a href="./PagesHelper.html">PagesHelper</a></li>
|
|
|
|
<li><a href="./PictureUploader.html">PictureUploader</a></li>
|
|
|
|
<li><a href="./PluginsHelper.html">PluginsHelper</a></li>
|
|
|
|
<li><a href="./Role.html">Role</a></li>
|
|
|
|
<li><a href="./Rubrik.html">Rubrik</a></li>
|
|
|
|
<li><a href="./RubrikenController.html">RubrikenController</a></li>
|
|
|
|
<li><a href="./RubrikenHelper.html">RubrikenHelper</a></li>
|
|
|
|
<li><a href="./Semester.html">Semester</a></li>
|
|
|
|
<li><a href="./SemestersController.html">SemestersController</a></li>
|
|
|
|
<li><a href="./SemestersHelper.html">SemestersHelper</a></li>
|
|
|
|
<li><a href="./StudienController.html">StudienController</a></li>
|
|
|
|
<li><a href="./StudienHelper.html">StudienHelper</a></li>
|
|
|
|
<li><a href="./Studium.html">Studium</a></li>
|
|
|
|
<li><a href="./StudmodsHelper.html">StudmodsHelper</a></li>
|
|
|
|
<li><a href="./Thema.html">Thema</a></li>
|
|
|
|
<li><a href="./ThemenController.html">ThemenController</a></li>
|
|
|
|
<li><a href="./ThemenHelper.html">ThemenHelper</a></li>
|
|
|
|
<li><a href="./Themengruppe.html">Themengruppe</a></li>
|
|
|
|
<li><a href="./ThemengruppenController.html">ThemengruppenController</a></li>
|
|
|
|
<li><a href="./ThemengruppenHelper.html">ThemengruppenHelper</a></li>
|
|
|
|
<li><a href="./TinymceTextInput.html">TinymceTextInput</a></li>
|
|
|
|
<li><a href="./UploaderInput.html">UploaderInput</a></li>
|
|
|
|
<li><a href="./User.html">User</a></li>
|
|
|
|
<li><a href="./UsersController.html">UsersController</a></li>
|
|
|
|
</ul>
|
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="documentation">
|
|
<h1 class="class">Calentry</h1>
|
|
|
|
<div id="description" class="description">
|
|
|
|
<h2>Schema Information</h2>
|
|
|
|
<p>Table name: calentries</p>
|
|
|
|
<pre>id :integer not null, primary key
|
|
start :datetime
|
|
ende :datetime
|
|
summary :string(255)
|
|
typ :integer
|
|
created_at :datetime not null
|
|
updated_at :datetime not null</pre>
|
|
|
|
</div><!-- description -->
|
|
|
|
|
|
|
|
|
|
<div id="5Buntitled-5D" class="documentation-section">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Methods -->
|
|
|
|
<div id="public-class-method-details" class="method-section section">
|
|
<h3 class="section-header">Public Class Methods</h3>
|
|
|
|
|
|
<div id="updated_at-method" class="method-detail ">
|
|
<a name="method-c-updated_at"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">updated_at</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="updated_at-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 33</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">updated_at</span>
|
|
<span class="ruby-comment">#Calentry.select("MAX(updated_at) as m_updated_at").first.m_updated_at</span>
|
|
<span class="ruby-constant">Calentry</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">max_by</span>(&<span class="ruby-value">:updated_at</span>).<span class="ruby-identifier">updated_at</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- updated_at-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- updated_at-method -->
|
|
|
|
|
|
</div><!-- public-class-method-details -->
|
|
|
|
<div id="public-instance-method-details" class="method-section section">
|
|
<h3 class="section-header">Public Instance Methods</h3>
|
|
|
|
|
|
<div id="dauer-method" class="method-detail ">
|
|
<a name="method-i-dauer"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">dauer</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="dauer-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 72</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">dauer</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>.<span class="ruby-identifier">nil?</span>
|
|
<span class="ruby-value">0</span>
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span> <span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>.<span class="ruby-identifier">nil?</span>
|
|
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span><span class="ruby-operator">-</span><span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>)<span class="ruby-operator">/</span><span class="ruby-value">3600</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- dauer-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- dauer-method -->
|
|
|
|
|
|
<div id="dauer-3D-method" class="method-detail ">
|
|
<a name="method-i-dauer-3D"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">dauer=</span><span
|
|
class="method-args">(dauer)</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="dauer-3D-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 80</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">dauer=</span>(<span class="ruby-identifier">dauer</span>)
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>=<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span><span class="ruby-operator">+</span><span class="ruby-identifier">dauer</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">hours</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- dauer-3D-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- dauer-3D-method -->
|
|
|
|
|
|
<div id="days_to_today-method" class="method-detail ">
|
|
<a name="method-i-days_to_today"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">days_to_today</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="days_to_today-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 46</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">days_to_today</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_ongoing?</span>
|
|
<span class="ruby-value">0</span>
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_upcomming?</span>
|
|
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>.<span class="ruby-identifier">to_date</span> <span class="ruby-operator">-</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>).<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">abs</span>
|
|
<span class="ruby-keyword">elsif</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">is_past?</span>
|
|
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>.<span class="ruby-identifier">to_date</span> <span class="ruby-operator">-</span> <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>).<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">abs</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span>
|
|
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- days_to_today-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- days_to_today-method -->
|
|
|
|
|
|
<div id="get_public-method" class="method-detail ">
|
|
<a name="method-i-get_public"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">get_public</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="get_public-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 58</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_public</span>
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">calendar</span>=<span class="ruby-keyword">self</span>.<span class="ruby-identifier">object</span>.<span class="ruby-identifier">calendar</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">calendar</span>.<span class="ruby-identifier">nil?</span>
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">public</span> = (<span class="ruby-keyword">self</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:object</span>).<span class="ruby-identifier">nil?</span>)<span class="ruby-operator">?</span> (<span class="ruby-keyword">self</span>.<span class="ruby-identifier">calendar</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:public?</span>)) <span class="ruby-operator">:</span> <span class="ruby-identifier">object</span>.<span class="ruby-identifier">try</span>(<span class="ruby-value">:public?</span>)
|
|
<span class="ruby-keyword">true</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- get_public-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- get_public-method -->
|
|
|
|
|
|
<div id="icon_text-method" class="method-detail ">
|
|
<a name="method-i-icon_text"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">icon_text</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="icon_text-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 90</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">icon_text</span>
|
|
<span class="ruby-constant">ApplicationController</span>.<span class="ruby-identifier">helpers</span>.<span class="ruby-identifier">fa_icon</span>(<span class="ruby-string">"calendar 2x"</span>) <span class="ruby-operator">+</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">text</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- icon_text-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- icon_text-method -->
|
|
|
|
|
|
<div id="is_ongoing-3F-method" class="method-detail ">
|
|
<a name="method-i-is_ongoing-3F"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">is_ongoing?</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="is_ongoing-3F-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 40</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_ongoing?</span>
|
|
(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span> <span class="ruby-operator"><</span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>) <span class="ruby-operator">&&</span> (<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator"><</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>)
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- is_ongoing-3F-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- is_ongoing-3F-method -->
|
|
|
|
|
|
<div id="is_past-3F-method" class="method-detail ">
|
|
<a name="method-i-is_past-3F"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">is_past?</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="is_past-3F-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 43</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_past?</span>
|
|
(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">></span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>)
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- is_past-3F-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- is_past-3F-method -->
|
|
|
|
|
|
<div id="is_upcomming-3F-method" class="method-detail ">
|
|
<a name="method-i-is_upcomming-3F"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">is_upcomming?</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="is_upcomming-3F-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 37</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">is_upcomming?</span>
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span> <span class="ruby-operator">></span> <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- is_upcomming-3F-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- is_upcomming-3F-method -->
|
|
|
|
|
|
<div id="name-method" class="method-detail ">
|
|
<a name="method-i-name"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">name</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="name-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 83</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">name</span>
|
|
<span class="ruby-keyword">unless</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">object</span>.<span class="ruby-identifier">nil?</span>
|
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">object</span>.<span class="ruby-identifier">title</span>
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-identifier">summary</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- name-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- name-method -->
|
|
|
|
|
|
<div id="s_time-3D-method" class="method-detail ">
|
|
<a name="method-i-s_time-3D"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">s_time=</span><span
|
|
class="method-args">(s_time)</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="s_time-3D-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 63</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">s_time=</span>(<span class="ruby-identifier">s_time</span>)
|
|
<span class="ruby-identifier">start</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- s_time-3D-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- s_time-3D-method -->
|
|
|
|
|
|
<div id="start1-method" class="method-detail ">
|
|
<a name="method-i-start1"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">start1</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="start1-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 69</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">start1</span>
|
|
<span class="ruby-identifier">start</span>.<span class="ruby-identifier">to_date</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- start1-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- start1-method -->
|
|
|
|
|
|
<div id="start_time-method" class="method-detail ">
|
|
<a name="method-i-start_time"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">start_time</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="start_time-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 66</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">start_time</span>
|
|
<span class="ruby-identifier">start</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- start_time-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- start_time-method -->
|
|
|
|
|
|
<div id="text-method" class="method-detail ">
|
|
<a name="method-i-text"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">text</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="text-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/models/calentry.rb, line 93</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">text</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>.<span class="ruby-identifier">nil?</span>
|
|
<span class="ruby-string">"error"</span>
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-keyword">if</span> (<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>.<span class="ruby-identifier">to_date</span> <span class="ruby-operator">-</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>.<span class="ruby-identifier">to_date</span>) <span class="ruby-operator"><</span> <span class="ruby-value">1</span>.<span class="ruby-identifier">day</span>
|
|
<span class="ruby-identifier">format</span>=<span class="ruby-value">:timeonly</span>
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-identifier">format</span> =<span class="ruby-value">:default</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-constant">I18n</span>.<span class="ruby-identifier">l</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">start</span>) <span class="ruby-operator">+</span><span class="ruby-string">" "</span><span class="ruby-operator">+</span> <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">t</span>(<span class="ruby-string">"cal.bis"</span>)<span class="ruby-operator">+</span><span class="ruby-string">" "</span><span class="ruby-operator">+</span> <span class="ruby-constant">I18n</span>.<span class="ruby-identifier">l</span>(<span class="ruby-keyword">self</span>.<span class="ruby-identifier">ende</span>, <span class="ruby-value">:format=</span><span class="ruby-operator">></span><span class="ruby-identifier">format</span>)
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- text-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- text-method -->
|
|
|
|
|
|
</div><!-- public-instance-method-details -->
|
|
|
|
</div><!-- 5Buntitled-5D -->
|
|
|
|
|
|
</div><!-- documentation -->
|
|
|
|
<div id="validator-badges">
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
Rdoc Generator</a> 2</small>.</p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|