Class: Juicy::ScaleDegree
- Inherits:
-
Object
- Object
- Juicy::ScaleDegree
- Defined in:
- lib/juicy/scale_degree.rb
Overview
some index of a given scale. if scale is [2,4,5,7,9,11,12], then a scale degree of 3 is 4. scale degree of 1 is 0 by definition. That is, the root of the scale is defined to be a scale degree of 1.
Instance Attribute Summary collapse
-
#degree ⇒ Object
readonly
Returns the value of attribute degree.
Instance Method Summary collapse
-
#initialize(degree) ⇒ ScaleDegree
constructor
A new instance of ScaleDegree.
- #to_s ⇒ Object
Constructor Details
#initialize(degree) ⇒ ScaleDegree
Returns a new instance of ScaleDegree.
12 13 14 |
# File 'lib/juicy/scale_degree.rb', line 12 def initialize(degree) @degree = degree end |
Instance Attribute Details
#degree ⇒ Object (readonly)
Returns the value of attribute degree.
10 11 12 |
# File 'lib/juicy/scale_degree.rb', line 10 def degree @degree end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/juicy/scale_degree.rb', line 16 def to_s @degree end |