Class: Ronin::Web::CLI::Commands::New::Nokogiri Private

Inherits:
Ronin::Web::CLI::Command show all
Includes:
Core::CLI::Generator
Defined in:
lib/ronin/web/cli/commands/new/nokogiri.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.

Generates a new nokogiri Ruby script for parsing HTML/XML.

Usage

ronin-web new nokogiri [options] FILE

Options

-U, --url URL                    Optional URL for the script
-h, --help                       Print help information

Arguments

FILE                             The file to create

Since:

  • 1.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-web new nokogiri command.

Parameters:

  • path (String)

    The path to the new script file to create.

Since:

  • 1.0.0



73
74
75
76
77
78
# File 'lib/ronin/web/cli/commands/new/nokogiri.rb', line 73

def run(path)
  @url = options[:url]

  erb 'nokogiri.rb.erb', path
  chmod '+x', path
end