Class: Juicy::ScaleDegree

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#degreeObject (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_sObject



16
17
18
# File 'lib/juicy/scale_degree.rb', line 16

def to_s
  @degree
end