Method: Vedeu::EscapeSequences::Esc#string

Defined in:
lib/vedeu/esc/esc.rb

#string(value = '') ⇒ String

Return the escape sequence string from the list of recognised sequence ‘commands’, or an empty string when the ‘command’ cannot be found.

Parameters:

  • value (String|Symbol) (defaults to: '')

Returns:

  • (String)


48
49
50
51
52
53
54
# File 'lib/vedeu/esc/esc.rb', line 48

def string(value = '')
  return '' unless present?(value)

  send(value)
rescue NoMethodError
  ''
end