class Musicality::Link::TargetedLink

Attributes

target_pitch[RW]

Public Class Methods

new(target_pitch) click to toggle source
# File lib/musicality/notation/model/link.rb, line 36
def initialize target_pitch
  @target_pitch = target_pitch
end

Public Instance Methods

==(other) click to toggle source
Calls superclass method Musicality::Link#==
# File lib/musicality/notation/model/link.rb, line 40
def ==(other)
  super && @target_pitch == other.target_pitch
end
to_s() click to toggle source
Calls superclass method Musicality::Link#to_s
# File lib/musicality/notation/model/link.rb, line 53
def to_s
  super + @target_pitch.to_s
end
transpose(diff) click to toggle source
# File lib/musicality/notation/model/link.rb, line 44
def transpose diff
  self.clone.transpose! diff
end
transpose!(diff) click to toggle source
# File lib/musicality/notation/model/link.rb, line 48
def transpose! diff
  @target_pitch = @target_pitch.transpose(diff)
  return self
end