Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Provide a uniform api between Simple, KeyValue and Chain stores #109
Provide a uniform api between Simple, KeyValue and Chain stores for public and private methods.
This is because a couple of gems I use out there need to call some of the internal methods of the simple store. When you try to use other gems configured with a Chain backend call those calls fail.
Basically I added the initialized?, translations and init_translations to the KeyValue and Chain stores.
Also added the functionality to be able to read back the translations from a key value store back to a hash as if it where read from the YAML files.
The gems that i know that would benefit from this would be i18n-js and babilu
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Whoops, commented over here kidpollo/i18n@3bc7ac9#commitcomment-601777 where I though I'd comment on the pull request. Maybe more coffee is in order.
So, I kinda like the idea.
I do think though that if we're supporting an api for 3rd party code then we should make it public.
Still pondering the exact api though.
Examples of where protected instance methods are used elsewhere:
My particular use case is because I want to use either of these gems with a Redis Store chained to the Simple store and neither Chain or Key Stores have the appropriate methods to be used with these either of these gems