Class: MusicSetTheory::ScaleChordCell

Inherits:
Object
  • Object
show all
Defined in:
lib/music_set_theory/chord_generator.rb,
lib/music_set_theory/chord_generator.rb

Overview

Represents different cells in the table of chords.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chordname_1, chordname_2, notes) ⇒ ScaleChordCell

Returns a new instance of ScaleChordCell.



222
223
224
225
226
# File 'lib/music_set_theory/chord_generator.rb', line 222

def initialize( chordname_1, chordname_2, notes )
  self.chordname_1 = chordname_1
  self.chordname_2 = chordname_2
  self.notes = notes
end

Instance Attribute Details

#chordname_1Object

Returns the value of attribute chordname_1.



221
222
223
# File 'lib/music_set_theory/chord_generator.rb', line 221

def chordname_1
  @chordname_1
end

#chordname_2Object

Returns the value of attribute chordname_2.



221
222
223
# File 'lib/music_set_theory/chord_generator.rb', line 221

def chordname_2
  @chordname_2
end

#notesObject

Returns the value of attribute notes.



221
222
223
# File 'lib/music_set_theory/chord_generator.rb', line 221

def notes
  @notes
end

Instance Method Details

#to_aObject



228
229
230
# File 'lib/music_set_theory/chord_generator.rb', line 228

def to_a
  [self.chordname_1, self.chordname_2, self.notes]
end