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
Based on feedback concerning the prior commit, this commit seeks to
further insulate the change of behavior to downstream implementors.
1) I added discussion and documentation about the change
2) I updated the tests accordingly
3) I added fall-back behavior in case someone inherited from
OIA::Provider but did not initialize with `super`
The method documentation for `OAI::Provider::Base#provider_context`
highlights the entirity of this change:
> The traditional interaction of a Provider has been to:
>
> 1. Assign attributes to the Provider class
> 2. Instantiate the Provider class
> 3. Call response instance methods for theProvider which pass
> the Provider class and not the instance.
>
> The above behavior continues unless you initialize the Provider with
> `{ :provider_context => :instance_based }`. If you do that, then the
>
> Provider behavior will be:
>
> 1. Assign attributes to Provider class
> 2. Instantiate the Provider class
> 3. Call response instance methods for theProvider which pass an
> instance of the Provider to those response objects.
> a. The instance will mirror all of the assigned Provider class
> attributes, but allows for overriding and extending on a
> case by case basis.
>
> (Dear reader, please note the second behavior is something most
> of us would've assumed to be the case, but for historic now lost
> reasons is not the case.)
0 commit comments