support to_i

master
muflax 2013-07-28 17:16:04 +02:00
parent 91589afb3f
commit e6c7f81d9a
1 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,10 @@ class Range
(self.begin.to_f..self.end.to_f)
end
def to_i
(self.begin.to_i..self.end.to_i)
end
def average
(self.begin + self.end) / 2.0
end