Closed
Description
The Contract
class has been heavily inlined, with results in much of the code being closed for modification. I cannot subclass Contract
and redefine how it handles Class contracts, for example, without rewriting an entirely new make_validator
method.
Why not generate contracts.rb
with ERB or other templating solution instead? That would allow the code to be broken down as it should be for maintainability, without sacrificing performance. (In particular, it would allow extending or monkeypatching Contract
to play nicely with RSpec, rather than modifying RSpec itself, as in contracts-rspec
.)
Metadata
Metadata
Assignees
Labels
No labels