subscribe and get_next_statement in ruby