class Array

Public Instance Methods

indent(offset) click to toggle source
# File lib/bashly/extensions/array.rb, line 2
def indent(offset)
  return self unless offset.positive?

  indentation = ' ' * offset
  map { |line| "#{indentation}#{line}" }
end
nonuniq() click to toggle source
# File lib/bashly/extensions/array.rb, line 9
def nonuniq
  tally.select { |_key, count| count > 1 }.keys
end