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

Add Girl#to_s (alias of #name) #59

Merged
merged 1 commit into from
Dec 14, 2014

Conversation

zonuexe
Copy link
Contributor

@zonuexe zonuexe commented Dec 14, 2014

デバッグ出力が見たいときは Girl#inspect が呼ばれるべきなので、 to_sname のエイリアスにする

case precure
when Precure.dokidoki
  puts "#{precure}はドキドキプリキュアだよ!"
when Precure.fresh
  puts "#{precure}はフレッシュプリキュアだよ!"
else
  puts "#{precure}はドキドキでもフレッシュでもないよ"
end

Before

#<Rubicure::Girl:0x007f9aef0bdf38>はフレッシュプリキュアだよ!

After

東せつなはフレッシュプリキュアだよ!

@sue445 sue445 added the unknown label Dec 14, 2014
@zonuexe
Copy link
Contributor Author

zonuexe commented Dec 14, 2014

(エイリアスの追加にテストを書くべきか?)

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) when pulling c0e13fc on zonuexe:feature/girls_name_to_s into fe41acc on sue445:master.

@sue445
Copy link
Owner

sue445 commented Dec 14, 2014

(エイリアスの追加にテストを書くべきか?)

2014-12-14 23 27 45

@sue445
Copy link
Owner

sue445 commented Dec 14, 2014

LGTM

sue445 added a commit that referenced this pull request Dec 14, 2014
@sue445 sue445 merged commit 3a811be into sue445:master Dec 14, 2014
@sue445 sue445 removed the unknown label Dec 14, 2014
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

3 participants