Closed jurriaan closed 9 years ago
Thanks for the tips! We will look into this as soon as we have time. We do accept style-related PRs as well, so feel free to work with us to create a more Ruby-programmer friendly gem! (We can add your name to the contributions.)
I'll be putting this issue on our to-do list.
mollie = Mollie::API::Client.new(api_key: 'key_here') would be great
Hi Dennis. We don't want to make the API client incompatible with dependency injection principles that some of our users follow. That's why configuration of the API key happens outside of the constructor.
this issue could be closed based on https://github.com/mollie/mollie-api-ruby/pull/9 right?
Great improvement rogierslag, thanks!
I have to say that wasnt me though ;)
Changes have been made in #9.
Please adhere to some sort of Ruby style guide (for example https://github.com/bbatsov/ruby-style-guide).
Things like 2 space soft-indent and
under_scored_method_names
are pretty common in the Ruby community.It would also be great if you had a setter on the class for the API Key, something like this:
That would make the usage of this gem much more pleasant in for example Rails.