method

real

ruby latest stable - Class: Complex
real()
public

Returns the real part.

Complex(7).real      #=> 7
Complex(9, -4).real  #=> 9