Class: MusicSetTheory::ScaleChords
- Inherits:
-
Object
- Object
- MusicSetTheory::ScaleChords
- Defined in:
- lib/music_set_theory/chord_generator.rb,
lib/music_set_theory/chord_generator.rb
Overview
Represents all the chords associated with a scale. This is used to make a tabular representation.
Instance Attribute Summary collapse
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#full_notes ⇒ Object
Returns the value of attribute full_notes.
-
#key ⇒ Object
Returns the value of attribute key.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#table_title ⇒ Object
Returns the value of attribute table_title.
Instance Method Summary collapse
-
#initialize(full_name, key, full_notes, table_title) ⇒ ScaleChords
constructor
A new instance of ScaleChords.
- #to_a ⇒ Object
Constructor Details
#initialize(full_name, key, full_notes, table_title) ⇒ ScaleChords
Returns a new instance of ScaleChords.
173 174 175 176 177 178 179 |
# File 'lib/music_set_theory/chord_generator.rb', line 173 def initialize( full_name, key, full_notes, table_title ) self.full_name = full_name self.key = key self.full_notes = full_notes self.table_title = table_title self.rows = [] end |
Instance Attribute Details
#full_name ⇒ Object
Returns the value of attribute full_name.
172 173 174 |
# File 'lib/music_set_theory/chord_generator.rb', line 172 def full_name @full_name end |
#full_notes ⇒ Object
Returns the value of attribute full_notes.
172 173 174 |
# File 'lib/music_set_theory/chord_generator.rb', line 172 def full_notes @full_notes end |
#key ⇒ Object
Returns the value of attribute key.
172 173 174 |
# File 'lib/music_set_theory/chord_generator.rb', line 172 def key @key end |
#rows ⇒ Object
Returns the value of attribute rows.
172 173 174 |
# File 'lib/music_set_theory/chord_generator.rb', line 172 def rows @rows end |
#table_title ⇒ Object
Returns the value of attribute table_title.
172 173 174 |
# File 'lib/music_set_theory/chord_generator.rb', line 172 def table_title @table_title end |
Instance Method Details
#to_a ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/music_set_theory/chord_generator.rb', line 181 def to_a tmp = [] tmp << [ self.full_name, self.key, self.full_notes, self.table_title, ] # self.rows.map{|r| # tmp << r.to_a # tmp += r.to_a tmp << r.to_a } ret = tmp ret end |