Class: MIDIMessage::Constant::Map

Inherits:
Object
  • Object
show all
Defined in:
lib/midi-message/constant.rb

Overview

The mapping of a constant key to its value eg “Note On” => 0x9

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Map

Returns a new instance of Map.

Parameters:

  • key (String)
  • value (Object)


129
130
131
132
# File 'lib/midi-message/constant.rb', line 129

def initialize(key, value)
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



125
126
127
# File 'lib/midi-message/constant.rb', line 125

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value.



125
126
127
# File 'lib/midi-message/constant.rb', line 125

def value
  @value
end