Class: Ronin::CLI::Commands::Quote Private
- Inherits:
-
StringMethodsCommand
- Object
- Core::CLI::Command
- Ronin::CLI::Command
- FileProcessorCommand
- StringProcessorCommand
- StringMethodsCommand
- Ronin::CLI::Commands::Quote
- Defined in:
- lib/ronin/cli/commands/quote.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.
Produces quoted a string for a variety of programming languages.
Usage
ronin quote [] [FILE ...]
Options
-f, --file FILE Optional file to process
--string STRING Optional string to process
-M, --multiline Process each line separately
-n, --keep-newlines Preserves newlines at the end of each line
-X, --hex Quotes the data as a Hex string
-c, --c Quotes the data as a C string
-j, --js JavaScript quotes the data
-S, --shell Quotes the data as a Shell String
-P, --powershell Quotes the data as a PowerShell String
-R, --ruby Quotes the data as a Ruby String
-h, --help Print help information
Arguments
[FILE ...] Optional file(s) to process
Instance Attribute Summary
Attributes included from MethodOptions
Attributes inherited from StringProcessorCommand
Instance Method Summary collapse
-
#process_string(string) ⇒ String
private
Quotes the String.
Methods included from MethodOptions
#apply_method_options, #initialize
Methods inherited from StringProcessorCommand
#initialize, #print_string, #process_input, #run
Methods inherited from FileProcessorCommand
#open_file, #process_file, #process_input, #run
Instance Method Details
#process_string(string) ⇒ String
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.
Note:
If no options are given, then --string
is assumed.
Quotes the String.
103 104 105 106 107 108 109 |
# File 'lib/ronin/cli/commands/quote.rb', line 103 def process_string(string) if @method_calls.empty? string.inspect else super(string) end end |