Class: ScaleGenerator::Scale
- Inherits:
-
Object
- Object
- ScaleGenerator::Scale
- Defined in:
- lib/scale_generator/scale.rb
Instance Method Summary collapse
-
#initialize(scale_hash, tuning = nil) ⇒ Scale
constructor
A new instance of Scale.
- #name ⇒ Object
- #to_png(show_intervals = false, options = {}) ⇒ Object
Constructor Details
#initialize(scale_hash, tuning = nil) ⇒ Scale
Returns a new instance of Scale.
6 7 8 |
# File 'lib/scale_generator/scale.rb', line 6 def initialize(scale_hash, tuning = nil) @scale_hash = scale_hash end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'lib/scale_generator/scale.rb', line 16 def name ScaleGenerator::Dictionary.name_for(frets) end |
#to_png(show_intervals = false, options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/scale_generator/scale.rb', line 10 def to_png(show_intervals = false, = {}) tuning = ([:tuning].nil?) ? ScaleGenerator::Dictionary::GUITAR_TUNINGS[:standard] : [:tuning] ScaleGenerator::PNGFormatter.new(@scale_hash, tuning).print(@scale_hash, show_intervals) end |