Sha256: 2f70b4d901102fa8f211ec423c6d695507d4be7036d11c13a959444eb56ac402
Contents?: true
Size: 455 Bytes
Versions: 20
Compression:
Stored size: 455 Bytes
Contents
class String # @see http://api.rubyonrails.org/classes/String.html#method-i-strip_heredoc def undent indent = scan(/^[ \t]*(?=\S)/).min.size || 0 gsub(/^[ \t]{#{indent}}/, '') end alias dedent undent def blank? to_s == '' end # @see http://apidock.com/rails/ActiveSupport/CoreExtensions/String/StartsEndsWith/starts_with% def starts_with?(prefix) prefix.respond_to?(:to_str) && self[0, prefix.length] == prefix end end
Version data entries
20 entries across 20 versions & 1 rubygems