practice/ruby/credit_card_mask.rb
# 1-3 this is the solution I was reaching for.

1-3 this is the solution I was reaching for.
1 - 3 this is the solution I was reaching for .
def maskify(cc)
	return cc if cc.length < 5
	masks		= "#" * (cc.length - 4)
	last_4	= cc.split('').last(4).join
	masks + last_4
end
def maskify ( cc ) return cc if cc . length < 5 masks = "#" * ( cc . length - 4 ) last_4 = cc . split ( '' ) . last ( 4 ) . join masks + last_4 end
1-3 this is the solution I was reaching for.
1 - 3 this is the solution I was reaching for .
cc