Class: Complex

Inherits:
Object
  • Object
show all
Defined in:
lib/zenaton/refinements/complex.rb

Overview

Reimplements ‘json/add/complex`

Class Method Summary collapse

Class Method Details

.from_zenaton(props) ⇒ Object

Parse from simple hash



21
22
23
# File 'lib/zenaton/refinements/complex.rb', line 21

def self.from_zenaton(props)
  Complex(props['r'], props['i'])
end