Class: Michael::Commands::Repos::PullRequests
- Inherits:
-
Object
- Object
- Michael::Commands::Repos::PullRequests
- Defined in:
- lib/michael/commands/repos/pull_requests.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#repos ⇒ Object
readonly
Returns the value of attribute repos.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(config, users, repos, options) ⇒ PullRequests
constructor
A new instance of PullRequests.
Constructor Details
#initialize(config, users, repos, options) ⇒ PullRequests
Returns a new instance of PullRequests.
11 12 13 14 15 16 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 11 def initialize(config, users, repos, ) @config = config @users = users @repos = repos @options = end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 9 def config @config end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 9 def @options end |
#repos ⇒ Object (readonly)
Returns the value of attribute repos.
9 10 11 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 9 def repos @repos end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
9 10 11 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 9 def users @users end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/michael/commands/repos/pull_requests.rb', line 18 def execute q = Queue.new waiting = print_waiting(q) list = config.fetch(:repos) list = repos.pull_requests(list, q) waiting.join puts [filter_repos_w_prs(list), get_empty(list), get_broken(list)] .reject(&:nil?).join("\n\n") end |