Class: Leg::Commands::Resolve

Inherits:
BaseCommand show all
Defined in:
lib/leg/commands/resolve.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#config, #opts

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

#git_to_litdiff!, inherited, #initialize, #litdiff_to_git!, #needs!, #output, #parseopts!

Constructor Details

This class inherits a constructor from Leg::Commands::BaseCommand

Class Method Details

.nameObject



4
5
6
# File 'lib/leg/commands/resolve.rb', line 4

def self.name
  "resolve"
end

.summaryObject



8
9
10
# File 'lib/leg/commands/resolve.rb', line 8

def self.summary
  "Continue rewriting steps after resolving a merge conflict."
end

.usageObject



12
13
14
# File 'lib/leg/commands/resolve.rb', line 12

def self.usage
  ""
end

Instance Method Details

#runObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/leg/commands/resolve.rb', line 19

def run
  needs! :config, :repo

  if @git.resolve!
    git_to_litdiff!
    output "Success!\n"
  else
    output "Looks like you've got a conflict to resolve!\n"
  end
end

#setopts!(o) ⇒ Object



16
17
# File 'lib/leg/commands/resolve.rb', line 16

def setopts!(o)
end