Class: Playwright::CLI::Commands::Destroy::Command

Inherits:
Object
  • Object
show all
Includes:
Utils::Display, Utils::FileManager
Defined in:
lib/playwright/cli/commands/destroy/command.rb

Constant Summary collapse

TEMPLATE_FILE =
'new_script.erb'.freeze
PATH_BIN_DIR =
Pathname.new(File.join('/', 'usr', 'local', 'bin'))
DEFAULT_COLOR =
:green

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Utils::FileManager

#file_manager

Methods included from Utils::Display

#display

Constructor Details

#initialize(name) ⇒ Command

Returns a new instance of Command.



19
20
21
# File 'lib/playwright/cli/commands/destroy/command.rb', line 19

def initialize(name)
  @name = name
end

Class Method Details

.run(name) ⇒ Object



15
16
17
# File 'lib/playwright/cli/commands/destroy/command.rb', line 15

def self.run(name)
  new(name).run
end

Instance Method Details

#runObject



23
24
25
# File 'lib/playwright/cli/commands/destroy/command.rb', line 23

def run
  file_manager.uninstall_script @name
end