Module: Ronin::Core::CLI::Generator::Options::Reference
- Defined in:
- lib/ronin/core/cli/generator/options/reference.rb
Overview
Adds the -R,--reference URL
option to the generator command.
Instance Attribute Summary collapse
-
#references ⇒ Array<String>
readonly
The reference URLs to output.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Object
Initializes #references.
Instance Attribute Details
#references ⇒ Array<String> (readonly)
The reference URLs to output.
42 43 44 |
# File 'lib/ronin/core/cli/generator/options/reference.rb', line 42 def references @references end |
Class Method Details
.included(command) ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ronin/core/cli/generator/options/reference.rb', line 28 def self.included(command) command.option :reference, short: '-R', value: { type: String, usage: 'URL' }, desc: 'Adds a reference URL' do |url| @references << url end end |
Instance Method Details
#initialize(**kwargs) ⇒ Object
Initializes #references.
50 51 52 53 54 |
# File 'lib/ronin/core/cli/generator/options/reference.rb', line 50 def initialize(**kwargs) super(**kwargs) @references = [] end |