Class: MIDIEvents::Constant::Map
- Inherits:
-
Object
- Object
- MIDIEvents::Constant::Map
- Defined in:
- lib/midi-events/constant.rb
Overview
A single constant mapping (name to value pair)
Represents an individual MIDI constant, pairing a human-readable name with its numeric MIDI value.
Instance Attribute Summary collapse
-
#key ⇒ String
readonly
The human-readable name of the constant.
-
#value ⇒ Object
readonly
The numeric MIDI value.
Instance Method Summary collapse
-
#initialize(key, value) ⇒ Map
constructor
Create a new constant mapping.
Constructor Details
#initialize(key, value) ⇒ Map
Create a new constant mapping
200 201 202 203 |
# File 'lib/midi-events/constant.rb', line 200 def initialize(key, value) @key = key @value = value end |
Instance Attribute Details
#key ⇒ String (readonly)
Returns The human-readable name of the constant.
191 192 193 |
# File 'lib/midi-events/constant.rb', line 191 def key @key end |
#value ⇒ Object (readonly)
Returns The numeric MIDI value.
194 195 196 |
# File 'lib/midi-events/constant.rb', line 194 def value @value end |