Class: HeadMusic::Style::Guidelines::TwoPerBar
- Inherits:
-
NoteCountPerBar
- Object
- Annotation
- NoteCountPerBar
- HeadMusic::Style::Guidelines::TwoPerBar
- Defined in:
- lib/head_music/style/guidelines/two_per_bar.rb
Overview
Checks that each middle bar contains exactly two half notes.
Constant Summary collapse
- MESSAGE =
"Use two half notes in each middle bar."- HALF =
HeadMusic::Rudiment::RhythmicValue.get(:half)
Instance Method Summary collapse
Constructor Details
This class inherits a constructor from HeadMusic::Style::Annotation
Instance Method Details
#check_middle_bar(bar_number) ⇒ Object (private)
12 13 14 15 16 17 |
# File 'lib/head_music/style/guidelines/two_per_bar.rb', line 12 def () = () return if .length == 2 && .all? { |note| note.rhythmic_value == HALF } () end |