Class: Rational

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

Overview

Reimplements ‘json/add/rational`

Class Method Summary collapse

Class Method Details

.from_zenaton(props) ⇒ Object

Parse from simple hash



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

def self.from_zenaton(props)
  Rational(props['n'], props['d'])
end