You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to this commit, instance methods of the Provider class were
passing the instance's class to the associated response classes. This
was a surprise; Why would an instance method send as a parameter
it's class instead of the instance method's instance?
This made it difficult to add context to the Provider on a request by
request basis; In our implementation, we wanted to pass the controller
to the instantiated provider instance.
Further, the following line of code was dangerous, in that it would
override the URL for the entire class and all future uses. (Perhaps
that's the OAI specification, but it's a dangerous class mutation)
```ruby
self.class.url = params['url'] ? params.delete('url') : self.class.url
```
All told, this commit seeks to:
* preserve backwards compatibility by adding instance methods that
mirror the expected class methods used by the Response module's
classes.
* provide extensibility for downstream implementers when they
instantiate an OAI::Provider
0 commit comments