module C4::Model::Refinement::Filler
Public Instance Methods
fill_up_to(desired_size, value = nil)
click to toggle source
fill_up_to
fills the array by appending the given value until the size reaches the disired size.
# File lib/c4/model/refinement/filler.rb, line 9 def fill_up_to(desired_size, value = nil) return self if size >= desired_size self + Array.new(desired_size - size, value) end