Class: OctoMerge::Context
- Inherits:
-
Object
- Object
- OctoMerge::Context
- Defined in:
- lib/octo_merge/context.rb
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
-
#working_directory ⇒ Object
readonly
Returns the value of attribute working_directory.
Instance Method Summary collapse
-
#initialize(working_directory:, repo:, pull_request_numbers:) ⇒ Context
constructor
A new instance of Context.
- #pull_requests ⇒ Object
Constructor Details
#initialize(working_directory:, repo:, pull_request_numbers:) ⇒ Context
Returns a new instance of Context.
5 6 7 8 9 |
# File 'lib/octo_merge/context.rb', line 5 def initialize(working_directory:, repo:, pull_request_numbers:) @working_directory = working_directory @repo = repo @pull_request_numbers = pull_request_numbers end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
3 4 5 |
# File 'lib/octo_merge/context.rb', line 3 def repo @repo end |
#working_directory ⇒ Object (readonly)
Returns the value of attribute working_directory.
3 4 5 |
# File 'lib/octo_merge/context.rb', line 3 def working_directory @working_directory end |
Instance Method Details
#pull_requests ⇒ Object
11 12 13 14 15 |
# File 'lib/octo_merge/context.rb', line 11 def pull_requests @pull_requests ||= pull_request_numbers.map do |number| PullRequest.new(repo: repo, number: number.to_s) end end |