Loading...

const_get - Metaprogramming in Ruby

668 22________

Another metaprogramming in Ruby that you'll find useful. Module.const_get allows you to pass a string or symbol value and returns the real constant or class. In this video, you'll learn how metaprogramming is used to implement the `resources` method in Rails routes.

Presenter: twitter.com/cjav_dev

Code: gist.github.com/cjavdev/10e280a5210cdf7297f4ecb436…

コメント