lib/head_music/octave.rb in head_music-0.19.0 vs lib/head_music/octave.rb in head_music-0.19.1
- old
+ new
@@ -37,7 +37,15 @@
def <=>(other)
to_i <=> other.to_i
end
+ def +(other)
+ self.class.get(to_i + other.to_i)
+ end
+
+ def -(other)
+ self.class.get(to_i - other.to_i)
+ end
+
private_class_method :new
end