Sha256: 277ec754e7ba73d728d10b4a02ba2c4974c9f76b46af8b8597fdf1587f9d3d2c
Contents?: true
Size: 461 Bytes
Versions: 22
Compression:
Stored size: 461 Bytes
Contents
# frozen_string_literal: true module Coltrane module Representation class 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 end
Version data entries
22 entries across 22 versions & 1 rubygems