2020-11-25 17:04:19 +01:00

13 lines
217 B
Ruby

# typed: strict
# frozen_string_literal: true
# Utility method extensions for String.
class String
extend T::Sig
sig { returns(String) }
def undent
gsub(/^.{#{(slice(/^ +/) || '').length}}/, "")
end
end