Class: String

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
rubocops/cask/extend/string.rb,
dev-cmd/irb.rb

Overview

Utility method extensions for String.

Direct Known Subclasses

Cask::DSL::Version

Instance Method Summary collapse

Instance Method Details

#f(*args) ⇒ Object



14
15
16
# File 'dev-cmd/irb.rb', line 14

def f(*args)
  Formulary.factory(self, *args)
end

#undentString

Returns:



9
10
11
# File 'rubocops/cask/extend/string.rb', line 9

def undent
  gsub(/^.{#{(slice(/^ +/) || '').length}}/, "")
end