Sha256: 2b5bc4e55b10f8567a1adcce75fa9fc2e17ca7c9f3264de2fc27e608d98cbf7d
Contents?: true
Size: 525 Bytes
Versions: 3
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true # Module for style guidelines. module HeadMusic::Style::Guidelines; end # A counterpoint guideline: Use a maximum of one octave leap. class HeadMusic::Style::Guidelines::LimitOctaveLeaps < HeadMusic::Style::Annotation MESSAGE = 'Use a maximum of one octave leap.' def marks return if octave_leaps.length <= 1 octave_leaps.map do |leap| HeadMusic::Style::Mark.for_all(leap.notes) end end private def octave_leaps melodic_intervals.select(&:octave?) end end
Version data entries
3 entries across 3 versions & 1 rubygems