There is a small defect in the printed definition: the listed family omits and is not a topology, since . We use the intended upper-ray topology on the real line, obtained by adjoining to that family.
Take . For every real ,
has finite complement and is therefore open in the cofinite topology. The inverse images of the empty set and the whole line are also open. Hence this nonconstant function is a continuous map for the corrected upper-ray topology on the real line. The same inverse-image calculation verifies the condition for every ray literally listed in the question.