Skip to content

fix: delegate Module#abstract! to super implementation if one exists#27

Open
goshanraj-g wants to merge 1 commit intoShopify:mainfrom
goshanraj-g:delegate-abstract-to-super
Open

fix: delegate Module#abstract! to super implementation if one exists#27
goshanraj-g wants to merge 1 commit intoShopify:mainfrom
goshanraj-g:delegate-abstract-to-super

Conversation

@goshanraj-g
Copy link
Copy Markdown

@goshanraj-g goshanraj-g commented Mar 28, 2026

Summary

  • Add Module#abstract! with super if defined?(super) to delegate to any existing abstract! implementation (e.g. Rail's 'AbstractController::Base.abstract!`) before running type_toolkit's own setup
  • Add TypeToolkit.make_abstract! to set up abstract class support

Fixes #10

Tests

  • Existing test suite passes (45 tests, 110 assertions)
  • New test verifies super delegates to an existing abstract! when one is defined
  • New test verifies abstract! works normally when no parent implementation exists
  • New test verifies basic abstract! functionality (marking methods as abstract)

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.

Delegate to super abstract! implementation, if any

1 participant