Class: WTFChord::Formatters::Piano

Inherits:
Piano1
  • Object
show all
Defined in:
lib/wtf_chord/formatters/piano.rb

Instance Attribute Summary

Attributes inherited from Piano1

#pressed_keys

Instance Method Summary collapse

Methods inherited from Piano1

#actual_notes, #initialize, separator, to_proc, #unique_notes, with_rates

Constructor Details

This class inherits a constructor from WTFChord::Formatters::Piano1

Instance Method Details

#drawObject



9
10
11
12
13
14
# File 'lib/wtf_chord/formatters/piano.rb', line 9

def draw
  [
    pressed_keys.map(&:to_s).join(" - "),
    keyboard_presentation
  ].join("\n")
end

#keyboard_presentationObject



16
17
18
# File 'lib/wtf_chord/formatters/piano.rb', line 16

def keyboard_presentation
  KeyboardPresentation.press(*pressed_keys)
end