2020-10-10 14:16:11 +02:00
|
|
|
# typed: true
|
2019-04-19 15:38:03 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-11-05 17:17:03 -05:00
|
|
|
# Utility method extensions for String.
|
2018-10-26 19:49:21 +01:00
|
|
|
class String
|
|
|
|
def undent
|
|
|
|
gsub(/^.{#{(slice(/^ +/) || '').length}}/, "")
|
|
|
|
end
|
|
|
|
end
|