Module: Ronin::Core::CLI::Generator::Options::Description

Defined in:
lib/ronin/core/cli/generator/options/description.rb

Overview

Adds the -D,--description TEXT option to the generator command.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionString? (readonly)

The description text to output.

Returns:

  • (String, nil)


48
49
50
# File 'lib/ronin/core/cli/generator/options/description.rb', line 48

def description
  @description
end

Class Method Details

.included(command) ⇒ Object

Defines the -D,--description TEXT option.

Parameters:



34
35
36
37
38
39
40
41
42
43
# File 'lib/ronin/core/cli/generator/options/description.rb', line 34

def self.included(command)
  command.option :description, short: '-D',
                               value: {
                                 type: String,
                                 usage: 'TEXT'
                               },
                               desc: 'A longer description' do |text|
                                 @description = text
                               end
end