Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cafe.rb の再修正 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

cafe.rb の再修正 #1

wants to merge 2 commits into from

Conversation

yuu-cc
Copy link
Owner

@yuu-cc yuu-cc commented Nov 2, 2023

No description provided.

cafe.rb Outdated
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'debug'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提出物からは不要ですから消しましょう

cafe.rb Outdated
@@ -30,5 +33,5 @@ def take_order(menus)
puts 'フードメニューはいかがですか?'
order2 = take_order(FOODS)

total = FOODS[order1][:price] + DRINKS[order2][:price]
total = DRINKS[order1][:price].to_i + FOODS[order2][:price].to_i
Copy link

@maedana maedana Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これでOKです。少し補足しますと本質的にはodrer1, order2のようなわかりにくい変数名が引きおこちがちな不具合と言えます。したがってわかりやすい変数名に変えた上で対応すると尚良いということになりますね 😄

@yuu-cc yuu-cc changed the title cafe.rb の修正 cafe.rb の再修正 Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants