2020-11-13 12:26:36 +01:00

13 lines
215 B
Ruby

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