Class: MIDIEvents::Constant::Map

Inherits:
Object
  • Object
show all
Defined in:
lib/midi-events/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)


122
123
124
125
# File 'lib/midi-events/constant.rb', line 122

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



118
119
120
# File 'lib/midi-events/constant.rb', line 118

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value.



118
119
120
# File 'lib/midi-events/constant.rb', line 118

def value
  @value
end