dynamic dispatch in ruby