class Music::Transcription::Change

Attributes

duration[R]
value[R]

Public Class Methods

new(value, duration) click to toggle source
# File lib/music-transcription/model/change.rb, line 7
def initialize value, duration
  @value = value
  @duration = duration
end
unpack(packing) click to toggle source
# File lib/music-transcription/packing/change_packing.rb, line 17
def self.unpack packing
  case packing.size
  when 1 then Immediate.new(*packing)
  when 2 then Gradual.new(*packing)
  else raise ArgumentError, "bad array size"
  end
end

Public Instance Methods

==(other) click to toggle source
# File lib/music-transcription/model/change.rb, line 12
def ==(other)
  self.class == other.class &&
  self.value == other.value &&
  self.duration == other.duration
end