lib/head_music/staff.rb in head_music-0.17.0 vs lib/head_music/staff.rb in head_music-0.18.0
- old
+ new
@@ -1,9 +1,12 @@
+# 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
+ alias 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