Class: Stratify::GitHub::Event
- Inherits:
-
Object
- Object
- Stratify::GitHub::Event
- Extended by:
- ActionView::Helpers
- Defined in:
- lib/stratify-github/events.rb
Direct Known Subclasses
CommitCommentEvent, CreateEvent, PullRequestEvent, PullRequestReviewCommentEvent, PushEvent
Defined Under Namespace
Classes: CommitCommentEvent, CreateEvent, DeleteEvent, FollowEvent, ForkEvent, GistEvent, GollumEvent, IssueCommentEvent, IssuesEvent, MemberEvent, PublicEvent, PullRequestEvent, PullRequestReviewCommentEvent, PushEvent, WatchEvent
Class Method Summary collapse
Class Method Details
.repo_url(event_url) ⇒ Object
10 11 12 13 |
# File 'lib/stratify-github/events.rb', line 10 def self.repo_url(event_url) # 'http://github.com/dhh/rails/commit/662bd00' => 'http://github.com/dhh/rails' event_url.split('/')[0..4].join('/') end |
.trunc(text, length = 140) ⇒ Object
6 7 8 |
# File 'lib/stratify-github/events.rb', line 6 def self.trunc(text, length=140) truncate(text, :length => length) end |