Class: Dapp::CLI::Command::Base

Inherits:
Dapp::CLI show all
Defined in:
lib/dapp/cli/command/base.rb

Constant Summary

Constants inherited from Dapp::CLI

SUBCOMMANDS

Instance Method Summary collapse

Methods included from Helper::Cli

#cli_wrapper, #composite_options, #in_validate!, #list_msg_format, #parse_options, #parse_subcommand, #prepare_subcommand, #required_argument, #run_subcommand

Methods included from Helper::Trivia

class_to_lowercase, #class_to_lowercase, #delete_file, #kwargs, #make_path, #search_file_upward

Constructor Details

#initializeBase

Returns a new instance of Base.



54
55
56
57
# File 'lib/dapp/cli/command/base.rb', line 54

def initialize
  self.class.options.merge!(Base.options)
  super()
end

Instance Method Details

#cli_options(**kvargs) ⇒ Object



67
68
69
# File 'lib/dapp/cli/command/base.rb', line 67

def cli_options(**kvargs)
  config.merge(dapp_command: run_method, **kvargs)
end

#run(_argv = ARGV) ⇒ Object



63
64
65
# File 'lib/dapp/cli/command/base.rb', line 63

def run(_argv = ARGV)
  raise
end

#run_methodObject



59
60
61
# File 'lib/dapp/cli/command/base.rb', line 59

def run_method
  class_to_lowercase
end