Class: Leg::Commands::Step
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!
Class Method Details
.name ⇒ Object
4
5
6
|
# File 'lib/leg/commands/step.rb', line 4
def self.name
"step"
end
|
.summary ⇒ Object
8
9
10
|
# File 'lib/leg/commands/step.rb', line 8
def self.summary
"Select a step for editing."
end
|
.usage ⇒ Object
12
13
14
|
# File 'lib/leg/commands/step.rb', line 12
def self.usage
"<step-number>"
end
|
Instance Method Details
#run ⇒ Object
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/leg/commands/step.rb', line 19
def run
needs! :config, :repo
step_number = @args.first.to_i
unless @git.checkout!(@args.first.to_i)
output "Error: Step not found.\n"
return false
end
end
|
#setopts!(o) ⇒ Object
16
17
|
# File 'lib/leg/commands/step.rb', line 16
def setopts!(o)
end
|