Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate delegation annotations #141

Open
Morriar opened this issue Dec 16, 2022 · 0 comments
Open

Validate delegation annotations #141

Morriar opened this issue Dec 16, 2022 · 0 comments
Labels
ci Change related to CI

Comments

@Morriar
Copy link
Contributor

Morriar commented Dec 16, 2022

Problem

We're currently using @method_missing to represent method being delegated to another class:

class MyClass

  # This method is actually delegated
  # @method_missing: delegated to MyOtherClass
  def my_method; end
end

The goal of this annotation is making it easier for the maintainer to find where the implementation of the method is and to define the right signature.

I wonder if we could be smarter and also validate that the target class does indeed provide the said method?

error: Couldn't find delegated `my_method` in `MyOtherClass`
@Morriar Morriar added the ci Change related to CI label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Change related to CI
Projects
None yet
Development

No branches or pull requests

1 participant