Class: OctoMerge::Execute
- Inherits:
-
Object
- Object
- OctoMerge::Execute
- Defined in:
- lib/octo_merge/execute.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
Instance Method Summary collapse
- #env ⇒ Object
-
#initialize(context:, strategy:) ⇒ Execute
constructor
A new instance of Execute.
- #run ⇒ Object
Constructor Details
#initialize(context:, strategy:) ⇒ Execute
Returns a new instance of Execute.
5 6 7 8 |
# File 'lib/octo_merge/execute.rb', line 5 def initialize(context:, strategy:) @context = context @strategy = strategy end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
3 4 5 |
# File 'lib/octo_merge/execute.rb', line 3 def context @context end |
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
3 4 5 |
# File 'lib/octo_merge/execute.rb', line 3 def strategy @strategy end |
Instance Method Details
#env ⇒ Object
14 15 16 17 18 19 |
# File 'lib/octo_merge/execute.rb', line 14 def env @env ||= strategy.new( working_directory: context.working_directory, pull_requests: context.pull_requests ) end |
#run ⇒ Object
10 11 12 |
# File 'lib/octo_merge/execute.rb', line 10 def run env.run end |