Metaprogramming trong Ruby
Bài viết gốc: https://www.toptal.com/ruby/ruby-metaprogramming-cooler-than-it-sounds
Metaprogramming
Metaprogramming là một kỹ thuật mà bạn có thể viết code tự động sinh ra code trong thời gian chạy. Điều này có nghĩa là bạn có thể định nghĩa các phương thức cho một class ngay trong khi đang chạy một chương trình nào đó. Điên rồ, phải không? Tóm lại thì bằng cách sử dụng metaprogramming, bạn có thể sửa...
Ruby
2421