gitlab-org--gitlab-foss/doc/app/Event.html
Dmitriy Zaporozhets 1ea0dd0ffc App docs
2012-10-25 11:59:41 +03:00

1222 lines
39 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>class Event - Rails Application 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/event.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>
<!-- Included Modules -->
<nav id="includes-section" class="section">
<h3 class="section-header">Included Modules</h3>
<ul class="link-list">
<li><a class="include" href="PushEvent.html">PushEvent</a>
</ul>
</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-determine_action">::determine_action</a>
<li><a href="#method-i-action_name">#action_name</a>
<li><a href="#method-i-allowed-3F">#allowed?</a>
<li><a href="#method-i-author">#author</a>
<li><a href="#method-i-changed_issue-3F">#changed_issue?</a>
<li><a href="#method-i-changed_merge_request-3F">#changed_merge_request?</a>
<li><a href="#method-i-closed-3F">#closed?</a>
<li><a href="#method-i-issue">#issue</a>
<li><a href="#method-i-issue-3F">#issue?</a>
<li><a href="#method-i-joined-3F">#joined?</a>
<li><a href="#method-i-left-3F">#left?</a>
<li><a href="#method-i-membership_changed-3F">#membership_changed?</a>
<li><a href="#method-i-merge_request">#merge_request</a>
<li><a href="#method-i-merge_request-3F">#merge_request?</a>
<li><a href="#method-i-merged-3F">#merged?</a>
<li><a href="#method-i-new_issue-3F">#new_issue?</a>
<li><a href="#method-i-new_merge_request-3F">#new_merge_request?</a>
<li><a href="#method-i-project_name">#project_name</a>
<li><a href="#method-i-push-3F">#push?</a>
<li><a href="#method-i-reopened-3F">#reopened?</a>
<li><a href="#method-i-target_title">#target_title</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="./doc/README_FOR_APP.html">README_FOR_APP</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="./Gitlab.html">Gitlab</a>
<li><a href="./Gitlab/API.html">Gitlab::API</a>
<li><a href="./Gitlab/APIHelpers.html">Gitlab::APIHelpers</a>
<li><a href="./Gitlab/AppLogger.html">Gitlab::AppLogger</a>
<li><a href="./Gitlab/Auth.html">Gitlab::Auth</a>
<li><a href="./Gitlab/Encode.html">Gitlab::Encode</a>
<li><a href="./Gitlab/Entities.html">Gitlab::Entities</a>
<li><a href="./Gitlab/Entities/Hook.html">Gitlab::Entities::Hook</a>
<li><a href="./Gitlab/Entities/Issue.html">Gitlab::Entities::Issue</a>
<li><a href="./Gitlab/Entities/Milestone.html">Gitlab::Entities::Milestone</a>
<li><a href="./Gitlab/Entities/Project.html">Gitlab::Entities::Project</a>
<li><a href="./Gitlab/Entities/ProjectMember.html">Gitlab::Entities::ProjectMember</a>
<li><a href="./Gitlab/Entities/ProjectSnippet.html">Gitlab::Entities::ProjectSnippet</a>
<li><a href="./Gitlab/Entities/RepoCommit.html">Gitlab::Entities::RepoCommit</a>
<li><a href="./Gitlab/Entities/RepoObject.html">Gitlab::Entities::RepoObject</a>
<li><a href="./Gitlab/Entities/SSHKey.html">Gitlab::Entities::SSHKey</a>
<li><a href="./Gitlab/Entities/User.html">Gitlab::Entities::User</a>
<li><a href="./Gitlab/Entities/UserBasic.html">Gitlab::Entities::UserBasic</a>
<li><a href="./Gitlab/Entities/UserLogin.html">Gitlab::Entities::UserLogin</a>
<li><a href="./Gitlab/FileEditor.html">Gitlab::FileEditor</a>
<li><a href="./Gitlab/GitLogger.html">Gitlab::GitLogger</a>
<li><a href="./Gitlab/Gitolite.html">Gitlab::Gitolite</a>
<li><a href="./Gitlab/Gitolite/AccessDenied.html">Gitlab::Gitolite::AccessDenied</a>
<li><a href="./Gitlab/GitoliteConfig.html">Gitlab::GitoliteConfig</a>
<li><a href="./Gitlab/GitoliteConfig/PullError.html">Gitlab::GitoliteConfig::PullError</a>
<li><a href="./Gitlab/GitoliteConfig/PushError.html">Gitlab::GitoliteConfig::PushError</a>
<li><a href="./Gitlab/GraphCommit.html">Gitlab::GraphCommit</a>
<li><a href="./Gitlab/InlineDiff.html">Gitlab::InlineDiff</a>
<li><a href="./Gitlab/Issues.html">Gitlab::Issues</a>
<li><a href="./Gitlab/Logger.html">Gitlab::Logger</a>
<li><a href="./Gitlab/Markdown.html">Gitlab::Markdown</a>
<li><a href="./Gitlab/Merge.html">Gitlab::Merge</a>
<li><a href="./Gitlab/Milestones.html">Gitlab::Milestones</a>
<li><a href="./Gitlab/Projects.html">Gitlab::Projects</a>
<li><a href="./Gitlab/Satellite.html">Gitlab::Satellite</a>
<li><a href="./Gitlab/Session.html">Gitlab::Session</a>
<li><a href="./Gitlab/Theme.html">Gitlab::Theme</a>
<li><a href="./Gitlab/Users.html">Gitlab::Users</a>
<li><a href="./Admin.html">Admin</a>
<li><a href="./Admin/DashboardController.html">Admin::DashboardController</a>
<li><a href="./Admin/GroupsController.html">Admin::GroupsController</a>
<li><a href="./Admin/HooksController.html">Admin::HooksController</a>
<li><a href="./Admin/LogsController.html">Admin::LogsController</a>
<li><a href="./Admin/ProjectsController.html">Admin::ProjectsController</a>
<li><a href="./Admin/ResqueController.html">Admin::ResqueController</a>
<li><a href="./Admin/TeamMembersController.html">Admin::TeamMembersController</a>
<li><a href="./Admin/UsersController.html">Admin::UsersController</a>
<li><a href="./Notes.html">Notes</a>
<li><a href="./Notes/CreateContext.html">Notes::CreateContext</a>
<li><a href="./Notes/LoadContext.html">Notes::LoadContext</a>
<li><a href="./Redcarpet.html">Redcarpet</a>
<li><a href="./Redcarpet/Render.html">Redcarpet::Render</a>
<li><a href="./Redcarpet/Render/GitlabHTML.html">Redcarpet::Render::GitlabHTML</a>
<li><a href="./ExtractsPath.html">ExtractsPath</a>
<li><a href="./ExtractsPath/InvalidPathError.html">ExtractsPath::InvalidPathError</a>
<li><a href="./FileSizeValidator.html">FileSizeValidator</a>
<li><a href="./FileSizeValidator/Helper.html">FileSizeValidator::Helper</a>
<li><a href="./Grack.html">Grack</a>
<li><a href="./Grack/Auth.html">Grack::Auth</a>
<li><a href="./IssueCommonality.html">IssueCommonality</a>
<li><a href="./IssueCommonality/ClassMethods.html">IssueCommonality::ClassMethods</a>
<li><a href="./StaticModel.html">StaticModel</a>
<li><a href="./StaticModel/ClassMethods.html">StaticModel::ClassMethods</a>
<li><a href="./Ability.html">Ability</a>
<li><a href="./Account.html">Account</a>
<li><a href="./ActivityObserver.html">ActivityObserver</a>
<li><a href="./AdminController.html">AdminController</a>
<li><a href="./ApplicationController.html">ApplicationController</a>
<li><a href="./ApplicationDecorator.html">ApplicationDecorator</a>
<li><a href="./ApplicationHelper.html">ApplicationHelper</a>
<li><a href="./AttachmentUploader.html">AttachmentUploader</a>
<li><a href="./Authority.html">Authority</a>
<li><a href="./BaseContext.html">BaseContext</a>
<li><a href="./BlameController.html">BlameController</a>
<li><a href="./BlobController.html">BlobController</a>
<li><a href="./Commit.html">Commit</a>
<li><a href="./CommitController.html">CommitController</a>
<li><a href="./CommitDecorator.html">CommitDecorator</a>
<li><a href="./CommitLoadContext.html">CommitLoadContext</a>
<li><a href="./CommitsController.html">CommitsController</a>
<li><a href="./CommitsHelper.html">CommitsHelper</a>
<li><a href="./CompareController.html">CompareController</a>
<li><a href="./DashboardController.html">DashboardController</a>
<li><a href="./DeployKeysController.html">DeployKeysController</a>
<li><a href="./ErrorsController.html">ErrorsController</a>
<li><a href="./Event.html">Event</a>
<li><a href="./EventDecorator.html">EventDecorator</a>
<li><a href="./EventsHelper.html">EventsHelper</a>
<li><a href="./GitHost.html">GitHost</a>
<li><a href="./GitlabMarkdownHelper.html">GitlabMarkdownHelper</a>
<li><a href="./Group.html">Group</a>
<li><a href="./GroupsController.html">GroupsController</a>
<li><a href="./HelpController.html">HelpController</a>
<li><a href="./HooksController.html">HooksController</a>
<li><a href="./Issue.html">Issue</a>
<li><a href="./IssueObserver.html">IssueObserver</a>
<li><a href="./IssuesBulkUpdateContext.html">IssuesBulkUpdateContext</a>
<li><a href="./IssuesController.html">IssuesController</a>
<li><a href="./IssuesHelper.html">IssuesHelper</a>
<li><a href="./IssuesListContext.html">IssuesListContext</a>
<li><a href="./Key.html">Key</a>
<li><a href="./KeyObserver.html">KeyObserver</a>
<li><a href="./KeysController.html">KeysController</a>
<li><a href="./LabelsController.html">LabelsController</a>
<li><a href="./MergeRequest.html">MergeRequest</a>
<li><a href="./MergeRequestObserver.html">MergeRequestObserver</a>
<li><a href="./MergeRequestsController.html">MergeRequestsController</a>
<li><a href="./MergeRequestsHelper.html">MergeRequestsHelper</a>
<li><a href="./MergeRequestsLoadContext.html">MergeRequestsLoadContext</a>
<li><a href="./Milestone.html">Milestone</a>
<li><a href="./MilestonesController.html">MilestonesController</a>
<li><a href="./Note.html">Note</a>
<li><a href="./NoteObserver.html">NoteObserver</a>
<li><a href="./NotesController.html">NotesController</a>
<li><a href="./NotesHelper.html">NotesHelper</a>
<li><a href="./Notify.html">Notify</a>
<li><a href="./OmniauthCallbacksController.html">OmniauthCallbacksController</a>
<li><a href="./PostReceive.html">PostReceive</a>
<li><a href="./ProfileController.html">ProfileController</a>
<li><a href="./ProfileHelper.html">ProfileHelper</a>
<li><a href="./Project.html">Project</a>
<li><a href="./ProjectHook.html">ProjectHook</a>
<li><a href="./ProjectObserver.html">ProjectObserver</a>
<li><a href="./ProjectResourceController.html">ProjectResourceController</a>
<li><a href="./ProjectsController.html">ProjectsController</a>
<li><a href="./ProjectsHelper.html">ProjectsHelper</a>
<li><a href="./ProtectedBranch.html">ProtectedBranch</a>
<li><a href="./ProtectedBranchesController.html">ProtectedBranchesController</a>
<li><a href="./PushEvent.html">PushEvent</a>
<li><a href="./PushObserver.html">PushObserver</a>
<li><a href="./RefsController.html">RefsController</a>
<li><a href="./RepositoriesController.html">RepositoriesController</a>
<li><a href="./Repository.html">Repository</a>
<li><a href="./SearchContext.html">SearchContext</a>
<li><a href="./SearchController.html">SearchController</a>
<li><a href="./Snippet.html">Snippet</a>
<li><a href="./SnippetsController.html">SnippetsController</a>
<li><a href="./SnippetsHelper.html">SnippetsHelper</a>
<li><a href="./SystemHook.html">SystemHook</a>
<li><a href="./SystemHookObserver.html">SystemHookObserver</a>
<li><a href="./SystemHookWorker.html">SystemHookWorker</a>
<li><a href="./TabHelper.html">TabHelper</a>
<li><a href="./TagsHelper.html">TagsHelper</a>
<li><a href="./Team.html">Team</a>
<li><a href="./TeamMembersController.html">TeamMembersController</a>
<li><a href="./TestHookContext.html">TestHookContext</a>
<li><a href="./Tree.html">Tree</a>
<li><a href="./TreeController.html">TreeController</a>
<li><a href="./TreeDecorator.html">TreeDecorator</a>
<li><a href="./TreeHelper.html">TreeHelper</a>
<li><a href="./User.html">User</a>
<li><a href="./UserObserver.html">UserObserver</a>
<li><a href="./UsersProject.html">UsersProject</a>
<li><a href="./UsersProjectObserver.html">UsersProjectObserver</a>
<li><a href="./Votes.html">Votes</a>
<li><a href="./WebHook.html">WebHook</a>
<li><a href="./Wiki.html">Wiki</a>
<li><a href="./WikisController.html">WikisController</a>
</ul>
</nav>
</div>
</nav>
<div id="documentation">
<h1 class="class">class Event</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="Closed">Closed
<dd class="description">
<dt id="Commented">Commented
<dd class="description">
<dt id="Created">Created
<dd class="description">
<dt id="Joined">Joined
<dd class="description">
<dt id="Left">Left
<dd class="description">
<dt id="Merged">Merged
<dd class="description">
<dt id="Pushed">Pushed
<dd class="description">
<dt id="Reopened">Reopened
<dd class="description">
<dt id="Updated">Updated
<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-determine_action" class="method-detail ">
<div class="method-heading">
<span class="method-name">determine_action</span><span
class="method-args">(record)</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<div class="method-source-code" id="determine_action-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 36</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">determine_action</span>(<span class="ruby-identifier">record</span>)
<span class="ruby-keyword">if</span> [<span class="ruby-constant">Issue</span>, <span class="ruby-constant">MergeRequest</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">class</span>
<span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Created</span>
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">record</span>.<span class="ruby-identifier">kind_of?</span> <span class="ruby-constant">Note</span>
<span class="ruby-constant">Event</span><span class="ruby-operator">::</span><span class="ruby-constant">Commented</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- determine_action-source -->
</div>
</div><!-- determine_action-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-action_name" class="method-detail ">
<div class="method-heading">
<span class="method-name">action_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="action_name-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 133</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">action_name</span>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">closed?</span>
<span class="ruby-string">&quot;closed&quot;</span>
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">merged?</span>
<span class="ruby-string">&quot;merged&quot;</span>
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">joined?</span>
<span class="ruby-string">'joined'</span>
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">left?</span>
<span class="ruby-string">'left'</span>
<span class="ruby-keyword">else</span>
<span class="ruby-string">&quot;opened&quot;</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- action_name-source -->
</div>
</div><!-- action_name-method -->
<div id="method-i-allowed-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">allowed?</span><span
class="method-args">()</span>
<span class="method-click-advice">click to toggle source</span>
</div>
<div class="method-description">
<p>Next events currently enabled for system</p>
<pre>- push
- new issue
- merge request</pre>
<div class="method-source-code" id="allowed-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 49</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">allowed?</span>
<span class="ruby-identifier">push?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">issue?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">merge_request?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">membership_changed?</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- allowed-3F-source -->
</div>
</div><!-- allowed-3F-method -->
<div id="method-i-author" class="method-detail ">
<div class="method-heading">
<span class="method-name">author</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="author-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 129</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">author</span>
<span class="ruby-ivar">@author</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">User</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">author_id</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- author-source -->
</div>
</div><!-- author-method -->
<div id="method-i-changed_issue-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">changed_issue?</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="changed_issue-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 104</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">changed_issue?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Issue&quot;</span> <span class="ruby-operator">&amp;&amp;</span>
[<span class="ruby-constant">Closed</span>, <span class="ruby-constant">Reopened</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">action</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- changed_issue-3F-source -->
</div>
</div><!-- changed_issue-3F-method -->
<div id="method-i-changed_merge_request-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">changed_merge_request?</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="changed_merge_request-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 99</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">changed_merge_request?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;MergeRequest&quot;</span> <span class="ruby-operator">&amp;&amp;</span>
[<span class="ruby-constant">Closed</span>, <span class="ruby-constant">Reopened</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">action</span>)
<span class="ruby-keyword">end</span></pre>
</div><!-- changed_merge_request-3F-source -->
</div>
</div><!-- changed_merge_request-3F-method -->
<div id="method-i-closed-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">closed?</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="closed-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 73</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">closed?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Closed</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- closed-3F-source -->
</div>
</div><!-- closed-3F-method -->
<div id="method-i-issue" class="method-detail ">
<div class="method-heading">
<span class="method-name">issue</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="issue-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 121</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">issue</span>
<span class="ruby-identifier">target</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Issue&quot;</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- issue-source -->
</div>
</div><!-- issue-method -->
<div id="method-i-issue-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">issue?</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="issue-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 81</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">issue?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Issue&quot;</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- issue-3F-source -->
</div>
</div><!-- issue-3F-method -->
<div id="method-i-joined-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">joined?</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="joined-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 109</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">joined?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Joined</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- joined-3F-source -->
</div>
</div><!-- joined-3F-method -->
<div id="method-i-left-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">left?</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="left-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 113</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">left?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Left</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- left-3F-source -->
</div>
</div><!-- left-3F-method -->
<div id="method-i-membership_changed-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">membership_changed?</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="membership_changed-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 117</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">membership_changed?</span>
<span class="ruby-identifier">joined?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">left?</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- membership_changed-3F-source -->
</div>
</div><!-- membership_changed-3F-method -->
<div id="method-i-merge_request" class="method-detail ">
<div class="method-heading">
<span class="method-name">merge_request</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="merge_request-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 125</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge_request</span>
<span class="ruby-identifier">target</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;MergeRequest&quot;</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- merge_request-source -->
</div>
</div><!-- merge_request-method -->
<div id="method-i-merge_request-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">merge_request?</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="merge_request-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 85</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merge_request?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;MergeRequest&quot;</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- merge_request-3F-source -->
</div>
</div><!-- merge_request-3F-method -->
<div id="method-i-merged-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">merged?</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="merged-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 69</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">merged?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Merged</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- merged-3F-source -->
</div>
</div><!-- merged-3F-method -->
<div id="method-i-new_issue-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">new_issue?</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="new_issue-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 89</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">new_issue?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;Issue&quot;</span> <span class="ruby-operator">&amp;&amp;</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Created</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- new_issue-3F-source -->
</div>
</div><!-- new_issue-3F-method -->
<div id="method-i-new_merge_request-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">new_merge_request?</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="new_merge_request-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 94</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">new_merge_request?</span>
<span class="ruby-identifier">target_type</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;MergeRequest&quot;</span> <span class="ruby-operator">&amp;&amp;</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Created</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- new_merge_request-3F-source -->
</div>
</div><!-- new_merge_request-3F-method -->
<div id="method-i-project_name" class="method-detail ">
<div class="method-heading">
<span class="method-name">project_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="project_name-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">project_name</span>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">project</span>
<span class="ruby-identifier">project</span>.<span class="ruby-identifier">name</span>
<span class="ruby-keyword">else</span>
<span class="ruby-string">&quot;(deleted project)&quot;</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- project_name-source -->
</div>
</div><!-- project_name-method -->
<div id="method-i-push-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">push?</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="push-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 65</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">push?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Pushed</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">valid_push?</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- push-3F-source -->
</div>
</div><!-- push-3F-method -->
<div id="method-i-reopened-3F" class="method-detail ">
<div class="method-heading">
<span class="method-name">reopened?</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="reopened-3F-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">reopened?</span>
<span class="ruby-identifier">action</span> <span class="ruby-operator">==</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span><span class="ruby-operator">::</span><span class="ruby-constant">Reopened</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- reopened-3F-source -->
</div>
</div><!-- reopened-3F-method -->
<div id="method-i-target_title" class="method-detail ">
<div class="method-heading">
<span class="method-name">target_title</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="target_title-source">
<pre><span class="ruby-comment"># File app/models/event.rb, line 61</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">target_title</span>
<span class="ruby-identifier">target</span>.<span class="ruby-identifier">try</span> <span class="ruby-value">:title</span>
<span class="ruby-keyword">end</span></pre>
</div><!-- target_title-source -->
</div>
</div><!-- target_title-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>