Sha256: 58130eada3ce972aa1115e50f2729a186423dc18db0c281e2119fc32f937cbc2
Contents?: true
Size: 572 Bytes
Versions: 2
Compression:
Stored size: 572 Bytes
Contents
module Music module Transcription class Tempo attr_reader :value def initialize value raise NonPositiveError, "Given tempo value #{value} is not positive" if value <= 0 @value = value end def ==(other) self.class == other.class && self.value == other.value end def clone self.class.new(@value) end class QNPM < Tempo; def to_s; "#{@value}qnpm" end; end class NPM < Tempo; def to_s; "#{@value}npm" end; end class BPM < Tempo; def to_s; "#{@value}bpm" end; end class NPS < Tempo; def to_s; "#{@value}nps" end; end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
music-transcription-0.21.0 | lib/music-transcription/model/tempo.rb |
music-transcription-0.20.0 | lib/music-transcription/model/tempo.rb |