Method: Musicality::Meter#check_beats_per_measure

Defined in:
lib/musicality/notation/model/meter.rb

#check_beats_per_measureObject



22
23
24
25
26
27
28
29
30
# File 'lib/musicality/notation/model/meter.rb', line 22

def check_beats_per_measure
  unless @beats_per_measure > 0
    raise NonPositiveError, "beats per measure #{@beats_per_measure} is not positive"
  end
  
  unless @beats_per_measure.is_a?(Integer)
    raise NonIntegerError, "beats per measure #{@beats_per_measure} is not an integer"
  end
end