lib/rake/toolkit_program/utils.rb
##
# Return a Range the includes the end
#
# This method will error if the subject Range excludes the end but
# the bounds are not Integers.
#
Return a Range the includes the end
This method will error if the subject Range excludes the end but
the bounds are not Integers.
Return a Range the includes the end This method will error if the subject Range excludes the end but the bounds are not Integers .
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
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
Return a Range the includes the end
This method will error if the subject Range excludes the end but
the bounds are not Integers.
Return a Range the includes the end This method will error if the subject Range excludes the end but the bounds are not Integers .