Class: Dapp::CLI::Command::Update

Inherits:
Dapp::CLI
  • Object
show all
Defined in:
lib/dapp/cli/command/update.rb

Constant Summary

Constants inherited from Dapp::CLI

SUBCOMMANDS

Instance Method Summary collapse

Methods inherited from Dapp::CLI

#initialize

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

This class inherits a constructor from Dapp::CLI

Instance Method Details

#run(_argv) ⇒ Object



5
6
7
8
9
10
# File 'lib/dapp/cli/command/update.rb', line 5

def run(_argv)
  spec = Gem::Specification.find do |s|
    File.fnmatch(File.join(s.full_gem_path, '*'), __FILE__)
  end
  Gem.install(spec.name, spec.version.approximate_recommendation)
end