Sha256: 28326743418d096fed9d67c19802e6f4d81e7365642596cebe07e1f4c0d50c16

Contents?: true

Size: 369 Bytes

Versions: 7

Compression:

Stored size: 369 Bytes

Contents

module HeadMusic::Style::Annotations
end

class HeadMusic::Style::Annotations::UpToThirteenNotes < HeadMusic::Style::Annotation
  MAXIMUM_NOTES = 13

  MESSAGE = 'Write up to thirteen notes.'

  def marks
    if overage > 0
      HeadMusic::Style::Mark.for_each(notes[13..-1])
    end
  end

  private

  def overage
    [notes.length - MAXIMUM_NOTES, 0].max
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
head_music-0.14.8 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.14.7 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.14.5 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.14.4 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.14.2 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.14.1 lib/head_music/style/annotations/up_to_thirteen_notes.rb
head_music-0.13.2 lib/head_music/style/annotations/up_to_thirteen_notes.rb