added self.extended hook example
define_method can be used to define method which accept blks