Class: String

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/rubocops/cask/extend/string.rb,
Library/Homebrew/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


13
14
15
# File 'Library/Homebrew/dev-cmd/irb.rb', line 13

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

#undentObject


6
7
8
# File 'Library/Homebrew/rubocops/cask/extend/string.rb', line 6

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