-
Notifications
You must be signed in to change notification settings - Fork 9
Enable the use of the "send" method on the configuration object #10
Comments
Hi there! You can use MyGem.configure do |c|
c.from_h(configs.deep_merge(cli_options))
end If your configuration is using strict mode (defined attributes), you can use a shorthand: MyGem.configuration.from_h(configs.deep_merge(cli_options)) If you still want to use send, use Cheers |
Ty a lot for the quick reply! I think I'm missing something here. I've already tried with If I try to access a configuration value I get |
Ok, got it! The problem are the hash keys. They're strings, not symbols. Now I've only a "design" question. Personally I think it would be great if What do you think? Would you accept a pull request to add this "sugar" to the gem? P.S: forgive again for the bother and ty again for your helpfulness. |
Cool. I'll put some thought into handling strings in |
Roger that. Anyway, jftr, a quick fix could be to explicitly transform the If there is something I can do let me know, I'll stick around ;) Ty again. |
Released configuration with hashes with string keys in |
While trying to set up a bunch of options identified by variables name I got stuck with the inability to use the method "send".
Here's the problematic snippet of code:
If I've left out some important information or if the issue isn't appropriate for some reasons please forgive me.
Cheers.
The text was updated successfully, but these errors were encountered: