Sha256: beae098551f8ac49db42fa2e2de8972bbc4f426b7ea4d2e63aaa203254c60065
Contents?: true
Size: 631 Bytes
Versions: 5
Compression:
Stored size: 631 Bytes
Contents
# encoding: utf-8 module IceNine class Freezer # A freezer class for handling Range objects class Range < Object # Deep Freeze a Range # # @example # range = IceNine:Freezer::Range.deep_freeze('a'..'z') # range.begin.frozen? # => true # range.end.frozen? # => true # # @param [Range] range # # @return [Range] # # @api public def self.deep_freeze(range) IceNine.deep_freeze(range.begin) IceNine.deep_freeze(range.end) super range end end # class Range end # class Freezer end # module IceNine
Version data entries
5 entries across 5 versions & 1 rubygems