class Gitgut::Github::PullRequest
A Github
pull request
Attributes
merged_at[R]
number[R]
state[R]
Public Class Methods
new(payload)
click to toggle source
# File lib/gitgut/github.rb, line 14 def initialize(payload) @number = payload[:number].to_s @state = payload[:state] # @url = payload[:url] # @title = payload[:title] @merged_at = payload[:merged_at] # @closed_at = payload[:closed_at] end
Public Instance Methods
color()
click to toggle source
# File lib/gitgut/github.rb, line 23 def color case state when 'open' :white when 'closed' merged? ? :green : :light_black end end
merged?()
click to toggle source
# File lib/gitgut/github.rb, line 32 def merged? !@merged_at.nil? end