Class: Snaptoken::Commands::Commit
Instance Attribute Summary
Attributes inherited from BaseCommand
#config
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseCommand
#git_to_litdiff!, inherited, #initialize, #litdiff_to_git!, #needs!, #parseopts!
Class Method Details
.name ⇒ Object
2
3
4
|
# File 'lib/snaptoken/commands/commit.rb', line 2
def self.name
"commit"
end
|
.summary ⇒ Object
6
7
8
|
# File 'lib/snaptoken/commands/commit.rb', line 6
def self.summary
"Append or insert a new step."
end
|
.usage ⇒ Object
10
11
12
|
# File 'lib/snaptoken/commands/commit.rb', line 10
def self.usage
""
end
|
Instance Method Details
#run ⇒ Object
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/snaptoken/commands/commit.rb', line 17
def run
needs! :config, :repo
if @git.commit!
git_to_litdiff!
puts "Success!"
else
puts "Looks like you've got a conflict to resolve!"
end
end
|
#setopts!(o) ⇒ Object
14
15
|
# File 'lib/snaptoken/commands/commit.rb', line 14
def setopts!(o)
end
|