Class ChordSymbol
In: app/models/chord_symbol.rb
Parent: ActiveRecord::Base

A standard chord symbol (if there is such a thing…). Several chord symbols can be associated with a given chord, and each chord can be designated case_sensitive or not, to handle cases such as M representing Major and m representing minor. Act as a list to facilitate preference ordering. May abandong this in the future to prefer a simple primary designation.

Associations

  • chord - Chord associated with the chord symbol.

Methods

resolve  

External Aliases

resolve -> []

Public Class methods

Finds a chord symbol

[Source]

    # File app/models/chord_symbol.rb, line 17
17:                 def resolve(symbol)
18:                         self.all.detect do |cs|
19:                                 cs.case_sensitive? ? (cs.name == symbol) : (cs.name.downcase == symbol.downcase)
20:                         end
21:                 end

[Validate]