-
Notifications
You must be signed in to change notification settings - Fork 0
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
[WIP]チームT #1
base: master
Are you sure you want to change the base?
[WIP]チームT #1
Conversation
README.md~
Outdated
@@ -0,0 +1 @@ | |||
Readme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このファイル消したい
cart.rb
Outdated
|
||
|
||
def fee | ||
sum = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
injectで短くできそう
lib/tregi/item.rb
Outdated
@@ -0,0 +1,9 @@ | |||
class Item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moduleに入れたい
lib/tregi/order.rb
Outdated
class Order | ||
item | ||
amount | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは使わないなら消すかな?
lib/tregi/item.rb
Outdated
attr_accessor :name | ||
attr_accessor :price | ||
|
||
def initialize(name, price) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initializeのparamsはhashがbestだと思う
理由は並び順に依存しないからです。
item | ||
amount | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは使っていないです
@cart.fee | ||
end | ||
|
||
def purchase(fee) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
カートに入っている合計価格 (self.fee)と 払われたお金(fee)は
違う名前にしたほうがわかりやすいかも
attr_accessor :name | ||
attr_accessor :price | ||
|
||
#def initialize(name, price) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これは消したい
attr_accessor :price | ||
|
||
#def initialize(name, price) | ||
def initialize(params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def initialize(params=={})
としたほうが良い?
class Register | ||
attr_reader :surplus | ||
|
||
def initialize(cart) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
カートをあとで変えれない?
No description provided.