class Coltrane::Theory::Key

Constants

KEY_REGEX

Public Class Methods

[](notation) click to toggle source
# File lib/coltrane/theory/key.rb, line 13
def self.[](notation)
  new(notation)
end
new(notation) click to toggle source
Calls superclass method Coltrane::Theory::DiatonicScale::new
# File lib/coltrane/theory/key.rb, line 8
def initialize(notation)
  _, note, s = *notation.match(KEY_REGEX)
  super(note, major: s != 'm')
end