class Music::Transcription::Link::TargetedLink

Attributes

target_pitch[RW]

Public Class Methods

new(target_pitch) click to toggle source
# File lib/music-transcription/model/link.rb, line 35
def initialize target_pitch
  @target_pitch = target_pitch
end

Public Instance Methods

==(other) click to toggle source
# File lib/music-transcription/model/link.rb, line 39
def ==(other)
  self.class == other.class && @target_pitch == other.target_pitch
end
to_s() click to toggle source
# File lib/music-transcription/model/link.rb, line 52
def to_s
  link_char + @target_pitch.to_s
end
transpose(diff) click to toggle source
# File lib/music-transcription/model/link.rb, line 43
def transpose diff
  self.clone.transpose! diff
end
transpose!(diff) click to toggle source
# File lib/music-transcription/model/link.rb, line 47
def transpose! diff
  @target_pitch = @target_pitch.transpose(diff)
  return self
end