(no title)
bboylen | 3 years ago
If a method expects to be passed an argument that it can call "quack" on, can't you define a type that has "quack"? The actual argument could be a Duck or a Goose but as long as it has a "quack" method the type will be OK
I haven't used types in Ruby (or much at all other than dabbling in Typescript), so I might be missing something
No comments yet.