Top Level Namespace

Instance Method Summary collapse

Instance Method Details

#puts_pyramid(message, height = 3) ⇒ Object



1
2
3
4
5
6
7
8
9
# File 'lib/puts_pyramid.rb', line 1

def puts_pyramid(message, height=3)
    height.times do |i|
        puts "*" * (i + 1)
    end
    puts message
    height.times do |i|
        puts "*" * (height-i)
    end
end