class GrowlGithubFeed::Event

Attributes

content_hash[R]

Public Class Methods

new(content_hash) click to toggle source
# File lib/growl-github-feed/event.rb, line 6
def initialize(content_hash)
  @content_hash = content_hash
end

Public Instance Methods

comment_body() click to toggle source
# File lib/growl-github-feed/event.rb, line 38
def comment_body
  h = content_hash.attrs
  return nil unless h.key? :payload
  h = h[:payload].attrs
  return nil unless h.key? :comment
  h = h[:comment].attrs
  h[:body]
end
created_at() click to toggle source
# File lib/growl-github-feed/event.rb, line 14
def created_at
  content_hash[:created_at].getlocal
end
id() click to toggle source
# File lib/growl-github-feed/event.rb, line 10
def id
  content_hash[:id]
end
repo_id() click to toggle source
# File lib/growl-github-feed/event.rb, line 22
def repo_id
  repo_part[:id]
end
repo_name() click to toggle source
# File lib/growl-github-feed/event.rb, line 26
def repo_name
  repo_part[:name]
end
type() click to toggle source
# File lib/growl-github-feed/event.rb, line 18
def type
  content_hash[:type]
end
user() click to toggle source
# File lib/growl-github-feed/event.rb, line 30
def user
  content_hash[:actor][:login]
end
user_avatar_id() click to toggle source
# File lib/growl-github-feed/event.rb, line 34
def user_avatar_id
  content_hash[:actor][:gravatar_id]
end

Private Instance Methods

repo_part() click to toggle source
# File lib/growl-github-feed/event.rb, line 49
def repo_part
  content_hash[:repo]
end