Class: String

Inherits:
Object show all
Includes:
InactiveSupport::CoreExtensions::String::Inflections
Defined in:
lib/ext/shell_escape.rb,
lib/inactive_support.rb,
lib/inactive_support/core_ext/blank.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from InactiveSupport::CoreExtensions::String::Inflections

#camelize, #classify, #constantize, #dasherize, #demodulize, #foreign_key, #humanize, #pluralize, #singularize, #tableize, #titleize, #underscore

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/inactive_support/core_ext/blank.rb', line 41

def blank?
  self !~ /\S/
end

#shell_escapeObject

Transforms this string into an escaped POSIX shell argument.



4
5
6
# File 'lib/ext/shell_escape.rb', line 4

def shell_escape
  inspect.gsub(/\\(\d{3})/) {$1.to_i(8).chr}
end