class Array

@private

Public Instance Methods

ljust!(n, x) click to toggle source
# File lib/xrbp/core_ext.rb, line 84
def ljust!(n, x)
  fill(x, length...n)
end
rjust!(n, x) click to toggle source
# File lib/xrbp/core_ext.rb, line 80
def rjust!(n, x)
  insert(0, *Array.new([0, n-length].max, x))
end