Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Country codes read in from yml? Extensible gem? #2

Closed
vraravam opened this issue Nov 15, 2011 · 2 comments
Closed

Country codes read in from yml? Extensible gem? #2

vraravam opened this issue Nov 15, 2011 · 2 comments

Comments

@vraravam
Copy link

Would it be possible to change iso_4217.rb and iso_3166_1.rb such that the values are read in from a yml file? Doing that and allowing any key for the property names (using method_missing or defining methods based on the attribute keys that are read in from the yaml file - instead of hard-coded method names in the ruby class) will allow the following:

The yml file could then be "externalized" to the consumer (you will need to provide a way for the gem consumer to specify a custom yml file) - ie they can take the default, add new attributes (for eg, in my case, I would like a "flag_sprite_class", "phone_code", "enabled"). Extending the gem will be super-easy in this case! What do you think?

@benjaminwood
Copy link

This is a good idea.

@alexrabarts
Copy link
Owner

There hasn't been much discussion around this issue so closing for now. I think it's beyond the scope of the gem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants