class Juicy::Mode

Attributes

rotate[R]
type[R]

Public Class Methods

new(type = :ionian) click to toggle source
# File lib/juicy/mode.rb, line 10
def initialize(type = :ionian)
  @type = type
  @rotate = case @type
  when :major
  0
  when :minor
    -2
  else
    0
  end
end

Public Instance Methods

==(other_mode) click to toggle source
# File lib/juicy/mode.rb, line 26
def ==(other_mode)
  if other_mode.kind_of? Mode
    type == other_mode.type
  elsif other_mode.kind_of? Symbol
    type == other_mode
  end
end
to_s() click to toggle source
# File lib/juicy/mode.rb, line 22
def to_s
  "#{@type}"
end