Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet-lint/monkeypatches/string_prepend.rb

Overview

Internal: Monkey patching String.

Instance Method Summary collapse

Instance Method Details

#prepend(lead) ⇒ Object

Internal: Prepends a String to self.

lead - The String to prepend self with.

Returns a String which is lead and self concatenated.



9
10
11
# File 'lib/puppet-lint/monkeypatches/string_prepend.rb', line 9

def prepend(lead)
  self.replace "#{lead}#{self}"
end