grape-entity
grape-entity copied to clipboard
🔥 Remove `FetchableObject`
Context
A PR addressing this issue: https://github.com/ruby-grape/grape-entity/issues/368
The thing I am confused about is why we check if object.respond_to?(:fetch, true). Implementing #fetch is tricky and I think that most of the time (if not always) we should rely on Hash to implement #fetch as that's in Ruby stdlib. Otherwise just default to #public_send.
Happy to close if it doesn't make sense either - but wanted to give it a shot and it looks like all tests still pass.
cc @LeFnord