Sha256: 6dfb75f293ce05c8078856f57a77319dad2c7124ab2a7d5c945b0ffd682acdd2

Contents?: true

Size: 454 Bytes

Versions: 2

Compression:

Stored size: 454 Bytes

Contents

module HeadMusic::Style::Annotations
end

class HeadMusic::Style::Annotations::StepToFinalNote < HeadMusic::Style::Annotation
  MESSAGE = 'Step to the final note.'

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

  private

  def step_to_final_note?
    last_melodic_interval && last_melodic_interval.step?
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
head_music-0.17.0 lib/head_music/style/annotations/step_to_final_note.rb
head_music-0.16.2 lib/head_music/style/annotations/step_to_final_note.rb