Invoke blocks in class methods.

Continuation of a4944afe009547b846aeae87f95824a0b3a61034 for class methods.

Pair: Adam Martin/Magnus Stahre