Class: Array

Inherits:
Object show all
Defined in:
lib/kitchen/patches/array.rb

Overview

Monkey patches for Array

Instance Method Summary collapse

Instance Method Details

#prefix(string) ⇒ Array<String>

Receives a string to add as prefix in each item and returns a new array with the concatenaded strings

Returns:



12
13
14
# File 'lib/kitchen/patches/array.rb', line 12

def prefix(string)
  map { |item| "#{string}#{item}" }
end