Class: OctoMerge::Strategy::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/octo_merge/strategy/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(working_directory:, pull_requests:) ⇒ Base

Returns a new instance of Base.



10
11
12
13
# File 'lib/octo_merge/strategy/base.rb', line 10

def initialize(working_directory:, pull_requests:)
  @working_directory = working_directory
  @pull_requests = pull_requests
end

Instance Attribute Details

#pull_requestsObject (readonly)

Returns the value of attribute pull_requests.



8
9
10
# File 'lib/octo_merge/strategy/base.rb', line 8

def pull_requests
  @pull_requests
end

#working_directoryObject (readonly)

Returns the value of attribute working_directory.



8
9
10
# File 'lib/octo_merge/strategy/base.rb', line 8

def working_directory
  @working_directory
end

Class Method Details

.run(*args) ⇒ Object



15
16
17
# File 'lib/octo_merge/strategy/base.rb', line 15

def self.run(*args)
  new(*args).tap { |strategy| strategy.run }
end

Instance Method Details

#runObject



19
20
21
# File 'lib/octo_merge/strategy/base.rb', line 19

def run
  fail NotImplementedError
end