Skip to content

Handle Provider class method display_name - #16

Open
toddkummer wants to merge 1 commit into
mainfrom
test-main-handle-display-name
Open

Handle Provider class method display_name#16
toddkummer wants to merge 1 commit into
mainfrom
test-main-handle-display-name

Conversation

@toddkummer

Copy link
Copy Markdown
Member

This adds an Appraisal file for the main branch. Main includes references to provider.class.display_name, which breaks the encapsulation of the SimpleDelegator around the provider.

The base Provider class already has an instance method name which does the same delegation (to self.class.display_name). If that was used instead of the direct call to class, then the delegation would hold. It might be worth asking about that.

There are a small number of methods on Provider that defer back to self.class: slug, capabilities, configuration_requirements, and protocols. The name -> display_name is unique in that it is the only one that maps the method name, but the pattern is there.

For now, this is handled by returning the dummy value "TestProvider".

This adds an Appraisal file for the main branch. Main includes references to `provider.class.display_name`, which breaks the encapsulation of the SimpleDelegator around the provider.

The base Provider class already has an instance method `name` which does the same delegation (to `self.class.display_name`). If that was used instead of the direct call to `class`, then the delegation would hold. It might be worth asking about that.

There are a small number of methods on Provider that defer back to `self.class`: slug, capabilities, configuration_requirements, and protocols. The name -> display_name is unique in that it is the only one that maps the method name, but the pattern is there.

For now, this is handled by returning the dummy value "TestProvider".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant