lib/time_index.rb in vcs_ruby-1.1.13 vs lib/time_index.rb in vcs_ruby-1.1.14
- old
+ new
@@ -6,11 +6,11 @@
class TimeIndex
include Comparable
attr_reader :total_seconds
def initialize time_index = ''
- if time_index.instance_of? Float or time_index.instance_of? Fixnum
+ if time_index.instance_of? Float or time_index.instance_of? Integer
@total_seconds = time_index
else
@total_seconds = 0.0
@to_parse = time_index.strip
@@ -64,19 +64,19 @@
def seconds
@total_seconds.abs % 60
end
def + operand
- if operand.instance_of? Fixnum
+ if operand.instance_of? Integer
TimeIndex.new @total_seconds + operand
else
TimeIndex.new @total_seconds + operand.total_seconds
end
end
def - operand
- if operand.instance_of? Fixnum
+ if operand.instance_of? Integer
TimeIndex.new @total_seconds - operand
else
TimeIndex.new @total_seconds - operand.total_seconds
end
end
@@ -84,10 +84,10 @@
def * operand
TimeIndex.new total_seconds * operand
end
def / operand
- if operand.instance_of? Fixnum
+ if operand.instance_of? Integer
TimeIndex.new @total_seconds / operand
else
@total_seconds / operand.total_seconds
end
end