Sha256: 6d1e63d52b969063f40cb1121306d75ba0530b1a6e90e5da1bd85f8610213b1a

Contents?: true

Size: 715 Bytes

Versions: 12

Compression:

Stored size: 715 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
      # @param [RecursionGuard] recursion_guard
      #
      # @return [Range]
      def self.guarded_deep_freeze(range, recursion_guard)
        super
        Freezer.guarded_deep_freeze(range.begin, recursion_guard)
        Freezer.guarded_deep_freeze(range.end, recursion_guard)
        range
      end

    end # Range
  end # Freezer
end # IceNine

Version data entries

12 entries across 10 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/lib/ice_nine/freezer/range.rb
ice_nine-0.11.2 lib/ice_nine/freezer/range.rb
ice_nine-0.11.1 lib/ice_nine/freezer/range.rb
ice_nine-0.11.0 lib/ice_nine/freezer/range.rb