Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/core_ext.rb
Overview
Here we add some syntax sugar to make the code more understandable later
Instance Method Summary collapse
Instance Method Details
#interval_name ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/core_ext.rb', line 42 def interval_name { 1 => 'Unison', 2 => 'Second', 3 => 'Third', 4 => 'Fourth', 5 => 'Fifth', 6 => 'Sixth', 7 => 'Seventh', 8 => 'Octave', 9 => 'Ninth', 10 => 'Tenth', 11 => 'Eleventh', 12 => 'Twelfth', 13 => 'Thirteenth', 14 => 'Fourteenth', 15 => 'Double Octave' }[self % 16] end |