Example of Metaprogramming in Ruby

This is from work I did on the Phone Parser gem. It allows for developers to check if a phone number is from a specific country and by leveraging metaprogramming, it generates the query methods at runtime.

Example

Code Implementation