Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/bashly/extensions/array.rb

Instance Method Summary collapse

Instance Method Details

#indent(offset) ⇒ Object



2
3
4
5
6
# File 'lib/bashly/extensions/array.rb', line 2

def indent(offset)
  return self unless offset > 0
  indentation = " " * offset
  map { |line| "#{indentation}#{line}" }
end