Class: Zold::Create
- Inherits:
-
Object
- Object
- Zold::Create
- Defined in:
- lib/zold/commands/create.rb
Overview
Create command
Instance Method Summary collapse
-
#initialize(wallets:, pubkey:, log: Log::Quiet.new) ⇒ Create
constructor
A new instance of Create.
- #run(args = []) ⇒ Object
Constructor Details
Instance Method Details
#run(args = []) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/zold/commands/create.rb', line 38 def run(args = []) id = args.empty? ? Id.new : Id.new(args[0]) wallet = @wallets.find(id) wallet.init(id, @pubkey) @log.info(wallet.id) @log.debug("Wallet #{Rainbow(wallet).green} \ created at #{@wallets.path}") wallet end |