class DevTools::PRlist::PullRequest
Attributes
issue[R]
Public Class Methods
new(issue)
click to toggle source
# File lib/pr_list/pull_requests.rb, line 16 def initialize(issue) @issue ||= issue end
Public Instance Methods
date()
click to toggle source
# File lib/pr_list/pull_requests.rb, line 20 def date @issue.created_at end
has_label?(filter_by)
click to toggle source
# File lib/pr_list/pull_requests.rb, line 24 def has_label?(filter_by) labels.any? { |label| [filter_by].flatten.map{ |l| l.downcase.strip }.include?(label.downcase.strip) } end
labels()
click to toggle source
# File lib/pr_list/pull_requests.rb, line 28 def labels @issue.labels.map { |l| l.name } end
method_missing(method_sym, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/pr_list/pull_requests.rb, line 8 def method_missing(method_sym, *arguments, &block) @issue.respond_to?(method_sym) ? @issue.send(method_sym, *arguments, &block) : super end
repo(opt = {})
click to toggle source
# File lib/pr_list/pull_requests.rb, line 32 def repo(opt = {}) opt[:short] = false unless opt.has_key?(:short) /repos\/(\w*\/?(.*))$/.match(@issue.repository_url)[opt[:short] ? 2 : 1] end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/pr_list/pull_requests.rb, line 12 def respond_to_missing?(method_name, include_private = false) @issue.respond_to?(method_name.to_sym) || super end