Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/mext/music/meter.rb

Overview

we extend the Float class to carry a to_meter which will convert a into a Meter class

Instance Method Summary collapse

Instance Method Details

#to_meterObject



97
98
99
100
# File 'lib/mext/music/meter.rb', line 97

def to_meter
  r = self.to_r
  Meter(r.numerator, r.denominator)
end