Class: Zold::Rebase
- Inherits:
-
Object
- Object
- Zold::Rebase
- Includes:
- ThreadBadge
- Defined in:
- lib/zold/commands/rebase.rb
Overview
REBASE command
Instance Method Summary collapse
-
#initialize(wallets:, log: Log::NULL) ⇒ Rebase
constructor
A new instance of Rebase.
-
#run(args = []) ⇒ Object
Returns the array of modified wallets (IDs).
Constructor Details
Instance Method Details
#run(args = []) ⇒ Object
Returns the array of modified wallets (IDs)
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/zold/commands/rebase.rb', line 49 def run(args = []) opts = Slop.parse(args, help: true, suppress_errors: true) do |o| o. = "Usage: zold rebase [ID...] [options] Available options:" o.bool '--help', 'Print instructions' end mine = Args.new(opts, @log).take || return list = mine.empty? ? @wallets.all : mine.map { |i| Id.new(i) } list.uniq.each do |id| rebase(id, opts) end end |