Sha256: 450db3994bf8cd10a718acdafb5d75edda695984c5b7133ccd0d92b188e2bc4f

Contents?: true

Size: 485 Bytes

Versions: 9

Compression:

Stored size: 485 Bytes

Contents

# Module for style guidelines.
module HeadMusic::Style::Guidelines; end

# A counterpoint guideline
class HeadMusic::Style::Guidelines::StepToFinalNote < HeadMusic::Style::Annotation
  MESSAGE = "Step to the final note."

  def marks
    HeadMusic::Style::Mark.for_all(notes[-2..]) unless step_to_final_note?
  end

  private

  def step_to_final_note?
    last_melodic_interval&.step?
  end

  def last_melodic_interval
    @last_melodic_interval ||= melodic_intervals.last
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
head_music-7.0.5 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-7.0.4 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-7.0.3 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-7.0.2 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-7.0.1 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-7.0.0 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-6.0.1 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-6.0.0 lib/head_music/style/guidelines/step_to_final_note.rb
head_music-5.0.0 lib/head_music/style/guidelines/step_to_final_note.rb