ruby-shoryuken / shoryuken

A super efficient Amazon SQS thread based message processor for Ruby. This project is in MAINTENANCE MODE. Reach me out on Slack link on the description if you want to become a new maintainer.
Other
2.06k stars 280 forks source link

Use Forwardable within Message to avoid method boilerplate #681

Closed GabrielMalakias closed 3 years ago

GabrielMalakias commented 3 years ago

First of all, thank you for maintaining this gem! I really appreciate your efforts.

While diving into the code I just noticed that a bunch of methods were defined just as a proxy to the data structure.

As I have seen here: https://github.com/ruby-shoryuken/shoryuken/blob/master/lib/shoryuken.rb#L48 I decided to use the SingleForwardable to delegate to the structure directly.

It's a small thing for now but might the beginning of some contributions

cjlarose commented 3 years ago

Thanks for your contribution! Tests are failing. I think you might want to look into Forwardable instead of SingleForwardable.

https://ruby-doc.org/stdlib-2.6.2/libdoc/forwardable/rdoc/Forwardable.html

GabrielMalakias commented 3 years ago

Done

cjlarose commented 3 years ago

Awesome work! Thanks!