class String

Public Instance Methods

blank?() click to toggle source
# File lib/thegarage/gitx/extensions/string.rb, line 9
def blank?
  self.to_s == ''
end
dedent()
Alias for: undent
undent() click to toggle source

@see api.rubyonrails.org/classes/String.html#method-i-strip_heredoc

# File lib/thegarage/gitx/extensions/string.rb, line 3
def undent
  indent = scan(/^[ \t]*(?=\S)/).min.size || 0
  gsub(/^[ \t]{#{indent}}/, '')
end
Also aliased as: dedent