lib/music-transcription/meter.rb in music-transcription-0.9.2 vs lib/music-transcription/meter.rb in music-transcription-0.10.0
- old
+ new
@@ -1,17 +1,16 @@
module Music
module Transcription
class Meter
include Validatable
-
attr_reader :measure_duration, :beat_duration, :beats_per_measure
+
+ @@check_methods = [ :check_beats_per_measure, :check_beat_duration ]
def initialize beats_per_measure, beat_duration
@beats_per_measure = beats_per_measure
@beat_duration = beat_duration
- @measure_duration = beats_per_measure * beat_duration
-
- @check_methods = [ :check_beats_per_measure, :check_beat_duration ]
+ @measure_duration = beats_per_measure * beat_duration
end
def check_beats_per_measure
unless @beats_per_measure > 0
raise NonPositiveError, "beats per measure #{@beats_per_measure} is not positive"
\ No newline at end of file