class Cooking

Public Class Methods

new(title:, ingredients:, kitchenware:) click to toggle source
# File lib/cooking.rb, line 4
def initialize(title:, ingredients:, kitchenware:)
  @title = title
  @ingredients = ingredients
  @kitchenware = kitchenware
end

Public Instance Methods

start!() click to toggle source
# File lib/cooking.rb, line 10
def start!
  puts @title
  puts "\n===== preparation ===== \n\ningredient:"
  text = ''
  @ingredients.each do |k ,v|
    text += "#{k.title * v} "
  end
  puts text
  puts "\nkitchenware:"
  text = ''
  @kitchenware.each do |k, _|
    text += "#{k.title} "
  end
  puts text
  puts "\n ===== cooking start! ===== \n\n"
end