Class: Ronin::CLI::Commands::New::Script Private

Inherits:
Ronin::CLI::Command show all
Includes:
Core::CLI::Generator
Defined in:
lib/ronin/cli/commands/new/script.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Creates a new standalone Ruby script.

Usage

ronin new script PATH

Arguments

PATH                             The script file to create

Since:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#run(path) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Runs the ronin new script command.

Parameters:

  • path (String)

    The path to the new script file to create.

Since:

  • 2.0.0



59
60
61
62
# File 'lib/ronin/cli/commands/new/script.rb', line 59

def run(path)
  erb 'script.rb.erb', path
  chmod '+x', path
end