class String

We can get rid of this when all rubies can support <<~ syntax

We can get rid of this when all rubies can support String#match? method

Public Instance Methods

match?(value) click to toggle source
# File lib/hatchet.rb, line 85
def match?(value)
  self =~ value
end
strip_heredoc() click to toggle source
# File lib/hatchet.rb, line 76
def strip_heredoc
  gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "".freeze)
end