Sha256: d260179a7c8b80bbc16f1162a1a37b9d0d447a921325b110f791fefe83239fd2

Contents?: true

Size: 328 Bytes

Versions: 147

Compression:

Stored size: 328 Bytes

Contents

class String
  # Separates the string on the given separator and prepends the given
  # value to each and returns a new string from the result.
  #
  # @param [String] separator
  # @param [String] value
  #
  # @return [String]
  def prepend_each(separator, value)
    lines(separator).collect { |x| value + x }.join
  end
end

Version data entries

147 entries across 147 versions & 1 rubygems

Version Path
berkshelf-1.1.2 lib/berkshelf/core_ext/string.rb
berkshelf-1.1.1 lib/berkshelf/core_ext/string.rb
berkshelf-1.1.0 lib/berkshelf/core_ext/string.rb
berkshelf-1.1.0.rc1 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.4 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.3 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.2 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.0 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.0.rc3 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.0.rc2 lib/berkshelf/core_ext/string.rb
berkshelf-1.0.0.rc1 lib/berkshelf/core_ext/string.rb
berkshelf-0.6.0.beta4 lib/berkshelf/core_ext/string.rb
berkshelf-0.6.0.beta3 lib/berkshelf/core_ext/string.rb
berkshelf-0.6.0.beta2 lib/berkshelf/core_ext/string.rb
berkshelf-0.5.1 lib/berkshelf/core_ext/string.rb
berkshelf-0.6.0.beta1 lib/berkshelf/core_ext/string.rb
berkshelf-0.5.0 lib/berkshelf/core_ext/string.rb
berkshelf-0.5.0.rc4 lib/berkshelf/core_ext/string.rb
berkshelf-0.5.0.rc3 lib/berkshelf/core_ext/string.rb
berkshelf-0.5.0.rc2 lib/berkshelf/core_ext/string.rb