태그 : Proc 요약보기전체보기목록닫기

1

play with Symbol#to_proc

If you are reasonable rails developer, you are so familiar with " &:symbol ". Have you thought how it work?Start with '&' operator. If you pass something with '&' to method, ruby think t...

Use Ruby Proc class for factory pattern

I think Proc is good for factory pattern. Of course, if the concrete product needs subclassing or anything else that real class is needed, we have to code class for concrete product. However, if it ...
1


구글애드센스