Sha256: dcfd5c1e904ff00d6b1a6f6a2180eb9bf8cd672e629637456b35ecdf1b45d70e
Contents?: true
Size: 412 Bytes
Versions: 3
Compression:
Stored size: 412 Bytes
Contents
# frozen_string_literal: true module ColtraneInstruments module Guitar class Note attr_reader :string, :fret def initialize(string, fret = nil) @string = string @fret = fret end def pitch string + fret unless fret.nil? end def pitch_class pitch.pitch_class unless fret.nil? end alias note pitch_class end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coltrane-2.2.1 | lib/coltrane_instruments/guitar/note.rb |
coltrane-2.1.5 | lib/coltrane_instruments/guitar/note.rb |
coltrane-2.1.0 | lib/coltrane_instruments/guitar/note.rb |