Class: WTFChord::PianoKey
- Inherits:
-
InstrumentPitch
- Object
- Pitch
- InstrumentPitch
- WTFChord::PianoKey
- Defined in:
- lib/wtf_chord/piano_key.rb
Instance Attribute Summary
Attributes inherited from InstrumentPitch
Attributes inherited from Pitch
Instance Method Summary collapse
Methods inherited from InstrumentPitch
#<=>, #code, #dead, #distance_to, #holded?, #init_pitch, #initialize, #initialize_dup
Methods inherited from Pitch
#-, #-@, #<=>, #==, #chord, #initialize, #move, #to_i, #to_s, #to_str
Constructor Details
This class inherits a constructor from WTFChord::InstrumentPitch
Instance Method Details
#dead? ⇒ Boolean
11 12 13 |
# File 'lib/wtf_chord/piano_key.rb', line 11 def dead? !pressed? end |
#press! ⇒ Object
15 16 17 |
# File 'lib/wtf_chord/piano_key.rb', line 15 def press! @pressed = true end |
#pressed? ⇒ Boolean
7 8 9 |
# File 'lib/wtf_chord/piano_key.rb', line 7 def pressed? !!@pressed end |