Class: Cmdlet::Misc::Safe

Inherits:
BaseCmdlet show all
Defined in:
lib/cmdlet/misc/safe.rb

Overview

Safe: pass through the value with <> and single and double quotes left as is

Instance Method Summary collapse

Methods inherited from BaseCmdlet

#tokenizer

Instance Method Details

#call(value) ⇒ String

Returns the value with <> and single and double quotes left as is.

Parameters:

  • value (String|Int)
    • value to pass through

Returns:

  • (String)

    the value with <> and single and double quotes left as is



11
12
13
14
# File 'lib/cmdlet/misc/safe.rb', line 11

def call(value)
  value = '' if value.nil?
  value
end