Class: MIDIMessage::Constant

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, value) ⇒ Constant

Returns a new instance of Constant.



49
50
51
52
# File 'lib/midi-message/constant.rb', line 49

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



47
48
49
# File 'lib/midi-message/constant.rb', line 47

def key
  @key
end

#valueObject (readonly)

Returns the value of attribute value.



47
48
49
# File 'lib/midi-message/constant.rb', line 47

def value
  @value
end

Class Method Details

.find(group_name, const_name) ⇒ Object



54
55
56
57
# File 'lib/midi-message/constant.rb', line 54

def self.find(group_name, const_name)
  group = ConstantGroup[group_name]
  group.find(const_name)      
end