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

クラス名が長い場合の変数名。 #62

Open
sakamoto-rh opened this issue Jun 29, 2013 · 2 comments
Open

クラス名が長い場合の変数名。 #62

sakamoto-rh opened this issue Jun 29, 2013 · 2 comments
Labels

Comments

@sakamoto-rh
Copy link

#61
からの引き続きissue

長い変数名
user_membership = UserMembership.new
user_membership_detail = UserMembershipDetail.new

namespaceがある場合
transaction = User::Transaction.new

@sakamoto-rh
Copy link
Author

単一のぱたーんだったら略しても良い?
detail = UserMembershipDetail.new

複数の似たようなクラスがある場合は特定出来るようなLvまで省略する?
team_detail = TeamMembershipDetail.new
user_detail = UserMembershipDetail.new

viewに渡す場合のみフルネームで記述する?
複数の要素が絡み合う可能性があるから。

1メソッドに複数の複数のDetailが存在する場合は省略しつつ

@sakamoto-rh
Copy link
Author

【決定】
viewに渡す場合のみ、フルネームで記述する。

【残課題】
決定以外の場合はどうするかを検討する。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant