Sha256: 37f55bc6bc68b1a447ab832f3b106c647ce2343d5675ea2af1c97a84ab71a0c9

Contents?: true

Size: 494 Bytes

Versions: 3

Compression:

Stored size: 494 Bytes

Contents

# frozen_string_literal: true

# A staff is a set of lines and spaces that provides context for a pitch
class HeadMusic::Staff
  DEFAULT_LINE_COUNT = 5

  attr_reader :default_clef, :line_count, :instrument
  alias_method :clef, :default_clef

  def initialize(default_clef, instrument: nil, line_count: nil)
    @default_clef = HeadMusic::Clef.get(default_clef)
    @line_count = line_count || DEFAULT_LINE_COUNT
    @instrument = HeadMusic::Instrument.get(instrument) if instrument
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
head_music-1.0.0 lib/head_music/staff.rb
head_music-0.29.0 lib/head_music/staff.rb
head_music-0.28.0 lib/head_music/staff.rb