class Array def remove_blanks reject { |value| value.blank? } end def remove_first self[1..-1] end def remove_last self[0...-1] end end