Module: JazzModel::ChordSymbolCollection
- Defined in:
- lib/jazz_model/chord_symbol_collection.rb
Overview
Module mixin for Chord symbols
Instance Method Summary collapse
-
#resolve(symbol) ⇒ Object
(also: #[])
WARNING: This is basically duplicated from ChordSymbol Find way to make this DRY!.
Instance Method Details
#resolve(symbol) ⇒ Object Also known as: []
WARNING: This is basically duplicated from ChordSymbol Find way to make this DRY!
Finds a chord symbol
9 10 11 12 13 |
# File 'lib/jazz_model/chord_symbol_collection.rb', line 9 def resolve(symbol) self.detect do |cs| cs.case_sensitive? ? (cs.name == symbol) : (cs.name.downcase == symbol.downcase) end end |