Class: Jamming::Chord
- Inherits:
-
Object
- Object
- Jamming::Chord
- Defined in:
- lib/jamming/chord.rb
Instance Attribute Summary collapse
-
#frets ⇒ Object
readonly
Returns the value of attribute frets.
Instance Method Summary collapse
-
#initialize(chord_as_string) ⇒ Chord
constructor
A new instance of Chord.
- #to_png(options = {}) ⇒ Object
Constructor Details
#initialize(chord_as_string) ⇒ Chord
Returns a new instance of Chord.
7 8 9 |
# File 'lib/jamming/chord.rb', line 7 def initialize(chord_as_string) @frets = parse(chord_as_string) end |
Instance Attribute Details
#frets ⇒ Object (readonly)
Returns the value of attribute frets.
5 6 7 |
# File 'lib/jamming/chord.rb', line 5 def frets @frets end |
Instance Method Details
#to_png(options = {}) ⇒ Object
11 12 13 |
# File 'lib/jamming/chord.rb', line 11 def to_png( = {}) Jamming::PNGFormatter.new(frets).print() end |