module Rake::ToolkitProgram::RangeConversion
Public Instance Methods
to_inclusive()
click to toggle source
Return a Range the includes the end
This method will error if the subject Range excludes the end but the bounds are not Integers.
# File lib/rake/toolkit_program/utils.rb, line 29 def to_inclusive return self unless exclude_end? raise "only Integer Ranges can be converted" if [self.begin, self.end].any? {|v| !(Integer === v)} return (self.begin..(self.end - 1)) end