Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/hatchet.rb,
lib/hatchet.rb
Overview
We can get rid of this when all rubies can support String#match? method
Instance Method Summary collapse
Instance Method Details
#match?(value) ⇒ Boolean
85 86 87 |
# File 'lib/hatchet.rb', line 85 def match?(value) self =~ value end |
#strip_heredoc ⇒ Object
76 77 78 |
# File 'lib/hatchet.rb', line 76 def strip_heredoc gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, "".freeze) end |