add extra files
This commit is contained in:
13
ruby/soda_methods.rb
Normal file
13
ruby/soda_methods.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
def order_soda(flavor, size = "medium", quantity = 1)
|
||||
if quantity == 1
|
||||
plural = "soda"
|
||||
else
|
||||
plural = "sodas"
|
||||
end
|
||||
puts "#{quantity} #{size} #{flavor} #{plural}!"
|
||||
end
|
||||
|
||||
|
||||
order_soda("orange")
|
||||
order_soda("lemon-lime", "small", 2)
|
||||
order_soda("grape", "large")
|
||||
Reference in New Issue
Block a user