Slice-polynomial functions and twistor geometry of ruled surfaces in CP 3