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

[WIP]チームT #1

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

[WIP]チームT #1

wants to merge 19 commits into from

Conversation

tanaka-yoshi10
Copy link
Collaborator

No description provided.

README.md~ Outdated
@@ -0,0 +1 @@
Readme
Copy link
Collaborator Author

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

injectで短くできそう

@@ -0,0 +1,9 @@
class Item
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moduleに入れたい

class Order
item
amount
end
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

これは使わないなら消すかな?

attr_accessor :name
attr_accessor :price

def initialize(name, price)
Copy link
Member

@murajun1978 murajun1978 Feb 4, 2017

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
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

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)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

カートをあとで変えれない?

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.

3 participants