Class: OctoMerge::InteractivePullRequests
- Inherits:
-
Object
- Object
- OctoMerge::InteractivePullRequests
- Defined in:
- lib/octo_merge/interactive_pull_requests.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(repo:, query:) ⇒ InteractivePullRequests
constructor
A new instance of InteractivePullRequests.
- #to_s ⇒ Object
Constructor Details
#initialize(repo:, query:) ⇒ InteractivePullRequests
Returns a new instance of InteractivePullRequests.
5 6 7 8 |
# File 'lib/octo_merge/interactive_pull_requests.rb', line 5 def initialize(repo:, query:) @repo = repo @query = query end |
Class Method Details
.get(options = {}) ⇒ Object
10 11 12 |
# File 'lib/octo_merge/interactive_pull_requests.rb', line 10 def self.get( = {}) new(repo: [:repo], query: [:query]).to_s end |
Instance Method Details
#to_s ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/octo_merge/interactive_pull_requests.rb', line 14 def to_s system("clear") idx = Ask.checkbox( "Select the pull requests you want to merge", formatted_pull_requests ) idx.zip(pull_requests).select { |e| e[0] }.map { |e| e[1].number }.join(",") end |