Posted to tcl by aspect at Wed Sep 10 08:34:21 GMT 2014view raw
- oo::class create klass {
- superclass oo::class
- constructor args {
- next {*}$args
- set methods [info class methods [self object]] ;# maybe use -all?
- assert {"foo" in $methods}
- # .. etc
- }
- }
- klass create Okay {
- method foo args {
- puts ok
- }
- }
- klass create Nope {
- method foo args {
- puts ok
- }
- }